Options for fixing JapanEraNameCompatTest in OpenJDK 8u
Severin Gehwolf
sgehwolf at redhat.com
Thu May 7 13:22:42 UTC 2020
Hi,
On Tue, 2020-03-10 at 19:56 +0100, Severin Gehwolf wrote:
> Hi,
>
> One of the failing tier1 tests in OpenJDK 8u is:
> test/java/util/Calendar/JapanEraNameCompatTest.java
>
> It fails with:
> java.lang.AssertionError: expected [Reiva] but found [\u0420\u0435\u0438\u0432\u0430]
> at org.testng.Assert.fail(Assert.java:94)
> test JapanEraNameCompatTest.testChronoJapanEraDisplayName(no, "Reiwa", "R"): failure
> java.lang.AssertionError: expected [R] but found [Reiwa]
>
> I've looked into this and the test got added with the 8u backport of
> JDK-8218781[1]. The reason why this fails for 8u and not for 11u is
> because the locale data in 8u is different. I assume the 8u backport[2]
> of 8218781 didn't include JavaTimeSupplementary_sr_Latn.java and
> JavaTimeSupplementary_no.java changes since the prerequisite JDK-
> 8008577[3] is not present in JDK 8u. Rightfully so. I don't think we'd
> want to backport JDK-8008577 (switch to CLDR Locale Data by default) in
> 8u. Long story short, we'd have two options to fix the test in 8u:
>
> Option 1:
> Include necessary bits from JDK-8008577 and missing pieces from the
> original JDK-8218781 changes for 'sr-Latn', 'no', 'sv', 'nl', 'lt',
> 'in', 'hr' locales. 'sr-Latn' and 'no' are the ones which the test
> exercises (webrev only includes 'sr-Latn' and 'no' locales for now):
> http://cr.openjdk.java.net/~sgehwolf/webrevs/JapanEraNameCompatTest/option1/webrev/
>
> Option 2:
> Accept the fact that locale data for sr-Latn and no (and others) are
> inferior to 11u locale data in the JRE provider and "fix" the test to
> not exercise those locales. Other missing locales work because they
> fall back to root locale:
> http://cr.openjdk.java.net/~sgehwolf/webrevs/JapanEraNameCompatTest/option2/webrev/
>
> Either way this calls for an 8u-only bug and fix IMO.
>
> I'd propose to go with option 1. If consensus is that, I'll propose
> this for review. Thoughts?
Anyone?
> Thanks,
> Severin
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8218781
> [2] http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/5cf8e52254c2
> [3] https://bugs.openjdk.java.net/browse/JDK-8008577
More information about the jdk8u-dev
mailing list