Uploaded image for project: 'Java Web Archive Toolkit'
  1. Java Web Archive Toolkit
  2. JWAT-57

Unit test in jwat-common fails occasionally when it should pass, due to ordering of results.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 1.0.0
    • 1.0.0
    • None

    Description

      One of the tests in jwat-common occasionally fails, with this result:

      test_contenttype(org.jwat.common.TestContentType): expected:
      <application/http; [msgtype=request; charset=utf8]>
      but was:
      <application/http; [charset=utf8; msgtype=request]>

      The test appears to be rejecting the test result due to the order of the mime-type attributes, but attributes are not order-sensitive and probably implemented by a Set under the hood. Sets do not guarantee ordering of entries so I would expect this test to fail 50% of the time.

      Attachments

        Activity

          People

            nicl@kb.dk Nicholas Clarke (Inactive)
            andrew.jackson@bl.uk Andrew Jackson (Inactive)
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: