JDK-8229922 : recently backported globalization tests fail on jdk8u
  • Type: Bug
  • Component: globalization
  • Affected Version: openjdk8u222
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • Submitted: 2019-08-20
  • Updated: 2021-09-13
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
Several tests with hidden origin was backported to jdk8u recently. They doesn't work for jdk-8.

> java/text/BreakIterator/BreakIteratorTest.java
> java/text/Format/DateFormat/DateFormatTest.java
> java/text/Format/DateFormat/NonGregorianFormatTest.java
> java/text/Format/MessageFormat/LargeMessageFormat.java
> java/text/Format/NumberFormat/NumberRegression.java
> java/text/Format/NumberFormat/NumberTest.java
> java/util/Calendar/CalendarRegression.java
> java/util/Calendar/JapanEraNameCompatTest.java
> java/util/TimeZone/HongKong.java
> sun/text/IntHashtable/Bug4170614Test.sh

8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/66a0979b0557

8219781: Localized names for Japanese era Reiwa in COMPAT provider
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/0bb89d93d4d7


----------System.err:(16/973)----------
java.lang.RuntimeException: Uncaught exception thrown in test method TestJapaneseLineBreak
        at IntlTest.errImpl(IntlTest.java:190)
        at IntlTest.errln(IntlTest.java:177)
        at IntlTest.run(IntlTest.java:123)
        at BreakIteratorTest.main(BreakIteratorTest.java:83)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
        at java.lang.Thread.run(Thread.java:748)

----------System.err:(14/732)----------
java.lang.RuntimeException
        at LargeMessageFormat.testFormat(LargeMessageFormat.java:102)
        at LargeMessageFormat.main(LargeMessageFormat.java:45)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
        at java.lang.Thread.run(Thread.java:748)

Comments
@Aleksey Shipilev I think you are right that the solution will be cherry-picking a locale update, but I don't think the fix is in CLDR. The following invocation passes {code} $JAVA_HOME/bin/java --show-version -cp ../testlib:. -Djava.locale.providers=COMPAT BreakIteratorTest -verbose TestJapaneseLineBreak openjdk 9.0.4 OpenJDK Runtime Environment (build 9.0.4+11) OpenJDK 64-Bit Server VM (build 9.0.4+11, mixed mode) BreakIteratorTest { TestJapaneseLineBreak Passed } Passed {code} That version of JDK9 has CLDR 29. But, my understanding of the COMPAT locale provider is it should use the JRE Locale source and not CLDR, which is also the default case for JDK8. As far as I can tell, it's RuleBasedBreakIterator which is being used, and I'm now tracing where it gets its data from.
13-09-2021

All but BreakIteratorTest.java pass for me now with jtreg-5.1-b01 and jdk8u302-b08 and current hg tip as at the time of writing this. With a newer jtreg (git describe: jtreg5.1-b01-70-gd7d07ef, although this is really a decendent commit of jtreg-6+1) JapanEraNameCompatTest.java begins to fail. I'll investigate that and file a new bug if necessary, and suggest leave *this* bug scoped to fixing BreakIteratorTest.
08-09-2021

> java/text/BreakIterator/BreakIteratorTest.java I suspect the cause for this failure is too old CLDR. This test does not fail in 11u (has CLDR 33), while failing in 8u (has CLDR 21). Maybe the fix is to do what Severin did with JDK-8244843.
27-04-2021

> sun/text/IntHashtable/Bug4170614Test.sh Should be fixed with JDK-8265988.
26-04-2021

Another 6 tests should be fixed once JDK-8252384 lands.
26-08-2020

Note that Jonathan Dowland is working on fixing those. I'll keep the bug assigned to Andrew as Jon doesn't have an OpenJDK ID yet. He found out that backporting JDK-8152077 fixes CalendarRegression.java. Adding a link to that issue.
19-08-2020

I believe JDK-8244843 fixed java/util/Calendar/JapanEraNameCompatTest.java failure.
04-08-2020