Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8292751

[TEST_BUG] Improve TestZoneInfo310.java Output

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 17
    • core-libs
    • None
    • generic
    • generic

      When TestZoneInfo310.java fails, the output is pretty unhelpful in trying to diagnose what is wrong:

      java.lang.RuntimeException: FAILED: availableIds don't match
      at TestZoneInfo310.main(TestZoneInfo310.java:163)

      This is because the availableIds array from the tzdata in the make source tree and the availableIds array from the test JDK's data are mismatched, but there is no information in the error as to what the arrays actually look like and where they diverge.

      In our case, it turned out that this is expected, because we're testing a JDK using newer system tzdata which is likely to differ from the older tzdata in the JDK source tree. A much easier way to catch this particular bug would have been to do the version check first and not even bother comparing every ID, as the test doesn't make sense in that situation.

      I made a few alterations locally to get more usable output and intend to use this bug to upstream these changes.

            andrew Andrew Hughes
            andrew Andrew Hughes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: