Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3521

TSimpleJSONProtocolTest is not deterministic (fails when run on JDK 8)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: Java - Library
    • Labels:
      None
    • Environment:

      OpenJDK 8

      Description

      TSimpleJSONProtocolTest has a couple of tests where structs are serialized, and the resultant JSON string is compared for equality with an expected value.

      Some of the structs' fields are sets, which do not ensure consistent ordering, causing this test to fail in environments where the "natural" ordering of the elements in the HashSet do not match the expected value.

      Suggested fix is to unset the fields that cause the inconsistent ordering and remove them from the expected value.

        Attachments

          Activity

            People

            • Assignee:
              bcg Benjamin Gould
              Reporter:
              bcg Benjamin Gould
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: