-
Bug
-
Resolution: Fixed
-
P4
-
21, 22
-
b17
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8317573 | 21.0.2 | Zdenek Zambersky | P4 | Resolved | Fixed | b03 |
It was discovered that java/util/Properties/StoreReproducibilityTest fails on some locales (Europe/Dublin), see:
https://github.com/adoptium/aqa-tests/issues/4751
Stack Trace:
java.lang.RuntimeException: Expected date comment Tue Sep 05 00:03:43 IST 2023 to be after Tue Sep 05 00:03:42 IST 2023 but was Mon Sep 04 19:33:43 IST 2023
at StoreReproducibilityTest.assertCurrentDate(StoreReproducibilityTest.java:434)
at StoreReproducibilityTest.testEmptySysPropValue(StoreReproducibilityTest.java:256)
at StoreReproducibilityTest.main(StoreReproducibilityTest.java:71)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
at java.base/java.lang.Thread.run(Thread.java:1583)
Details:
Problem was tracked down to ambiguous time zone abbreviations. For Europe/Dublin timezone, Date.toString (used by Properties.store) specifies timezone as IST ("Irish Summer Time"), but IST is decoded by FORMATER (in test) as "India Standard Time" resulting in unexpected date and test failure.
I have found mention of this issue in DateTimeFormatterBuilder class:
... Many textual zone names are not unique, such as CST can be for both "Central Standard Time" and "China Standard Time". In this situation, the zone id will be determined by the region information from formatter's locale and the standard zone id for that area, ...
However FORMATER (used in this test to parse date string) has to use ROOT locale (see:JDK-8282023).
Possible workarounds would be ether to avoid ambiguous time zone abbreviations by explicitly setting timezone in test. Or skipping check which compares dates.
https://github.com/adoptium/aqa-tests/issues/4751
Stack Trace:
java.lang.RuntimeException: Expected date comment Tue Sep 05 00:03:43 IST 2023 to be after Tue Sep 05 00:03:42 IST 2023 but was Mon Sep 04 19:33:43 IST 2023
at StoreReproducibilityTest.assertCurrentDate(StoreReproducibilityTest.java:434)
at StoreReproducibilityTest.testEmptySysPropValue(StoreReproducibilityTest.java:256)
at StoreReproducibilityTest.main(StoreReproducibilityTest.java:71)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
at java.base/java.lang.Thread.run(Thread.java:1583)
Details:
Problem was tracked down to ambiguous time zone abbreviations. For Europe/Dublin timezone, Date.toString (used by Properties.store) specifies timezone as IST ("Irish Summer Time"), but IST is decoded by FORMATER (in test) as "India Standard Time" resulting in unexpected date and test failure.
I have found mention of this issue in DateTimeFormatterBuilder class:
... Many textual zone names are not unique, such as CST can be for both "Central Standard Time" and "China Standard Time". In this situation, the zone id will be determined by the region information from formatter's locale and the standard zone id for that area, ...
However FORMATER (used in this test to parse date string) has to use ROOT locale (see:
Possible workarounds would be ether to avoid ambiguous time zone abbreviations by explicitly setting timezone in test. Or skipping check which compares dates.
- backported by
-
JDK-8317573 StoreReproducibilityTest fails on some locales
- Resolved