Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3389

Test can fail if HashSet iterates in a different order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.22.0
    • None

    Description

      For test `testTenElementsSetLiteral`(https://github.com/apache/calcite/blob/78c2a007b5b597f673323b80dde21c23d31f23ea/linq4j/src/test/java/org/apache/calcite/linq4j/test/ExpressionTest.java#L1538)

      It relies on the iteration order of a HashSet. However, HashSet does not guarantee any specific order of entries. Tests can fail if the iteration order changes.

      Please let me know if you want to discuss the changes more.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              contextshuffling contextshuffling
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m