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.
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.
- relates to
-
JDK-8007572 Replace existing jdk timezone data at <java.home>/lib/zi with JSR310's tzdb.jar for j.util.TimeZone
-
- Closed
-