Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19888 closed defect (fixed)

JosmDecimalFormatSymbolsProviderTest broken on GitHub CI

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 20.11
Component: Unit tests Version:
Keywords: github-ci Cc: Stereo


The unit test JosmDecimalFormatSymbolsProviderTest.testGroupingSeparator introduced via #19397 is not working on GitHub CI: ​

Attachments (0)

Change History (12)

comment:1 by simon04, 3 years ago

Testing locally:

$ java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10)
OpenJDK 64-Bit Server VM (build 11.0.8+10, mixed mode)

$ cat /etc/locale.conf
de_AT.UTF-8 UTF-8
en_GB.UTF-8 UTF-8 
en_IE.UTF-8 UTF-8 
en_US.UTF-8 UTF-8

$ LANG=en_AU.UTF-8 ant test '-Ddefault-junit-includes=**/JosmDecimalFormatSymbolsProviderTest.class'
# OK (0 tests failed)

$ LANG=en_GB.UTF-8 ant test '-Ddefault-junit-includes=**/JosmDecimalFormatSymbolsProviderTest.class'
# BROKEN (1 tests failed)

$ LANG=en_IE.UTF-8 ant test '-Ddefault-junit-includes=**/JosmDecimalFormatSymbolsProviderTest.class'
# BROKEN (1 tests failed)

$ LANG=en_US.UTF-8 ant test '-Ddefault-junit-includes=**/JosmDecimalFormatSymbolsProviderTest.class'
# OK (0 tests failed)

What's going on?

comment:2 by simon04, 3 years ago

In 17089/josm:

see #19888 - Make PluginHandlerJOSMTooOldTest more robust

comment:3 by simon04, 3 years ago

Ticket #19443 has been marked as a duplicate of this ticket.

comment:4 by simon04, 3 years ago

Cc: Stereo added

comment:5 by simon04, 3 years ago

In 17155/josm:

see #19888, see #19370 - GitHub Actions: specify LANG=en_US.UTF-8

comment:6 by Stereo, 3 years ago

I didn't know anyone was actually using these on the JOSM side! I've been vaguely maintaining a fork at

Tests get broken about once a month for one reason or another, and it's a bit frustrating. I think it would be more useful and transparent if we could repatriate the infrastructure to build the macOS releases on Github on the 'main' repo.

comment:7 by simon04, 3 years ago

Resolution: fixed
Status: assignedclosed

The unit test failure is gone thanks to r17155.

comment:8 by simon04, 3 years ago

@Stereo, for the general GitHub CI discussion, please use #19370.

comment:9 by Don-vip, 3 years ago

Milestone: 20.1020.11

Milestone renamed

comment:10 by Don-vip, 3 years ago

@Simon I still see this error on GitHub. And I can reproduce locally on Windows 10 French, from Eclipse and Java 16:

org.opentest4j.AssertionFailedError: de ==> expected: <123 456> but was: <123.456>
	at org.junit.jupiter.api.AssertionUtils.failNotEqual(
	at org.junit.jupiter.api.AssertEquals.assertEquals(
	at org.junit.jupiter.api.Assertions.assertEquals(
	at java.base/$ForEachOp$OfRef.accept(
	at java.base/$3$1.accept(
	at java.base/$2$1.accept(
	at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(
	at java.base/$ConcatSpliterator.forEachRemaining(
	at java.base/
	at java.base/
	at java.base/$ForEachOp.evaluateSequential(
	at java.base/$ForEachOp$OfRef.evaluateSequential(
	at java.base/
	at java.base/
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.base/java.lang.reflect.Method.invoke(
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(
	at org.junit.platform.launcher.core.DefaultLauncher.execute(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(

comment:11 by Don-vip, 3 years ago

In my case our provider is completely ignored and setup very early indirectly by org.junit.platform.engine.UniqueIdFormat:

Thread [main] (Suspended (breakpoint at line 217 in sun.util.locale.provider.JRELocaleProviderAdapter))	
	sun.util.cldr.CLDRLocaleProviderAdapter(sun.util.locale.provider.JRELocaleProviderAdapter).getDecimalFormatSymbolsProvider() line: 217	
	sun.util.cldr.CLDRLocaleProviderAdapter(sun.util.locale.provider.JRELocaleProviderAdapter).getLocaleServiceProvider(java.lang.Class<P>) line: 101	
	sun.util.locale.provider.LocaleProviderAdapter.findAdapter(java.lang.Class<? extends java.util.spi.LocaleServiceProvider>, java.util.Locale) line: 289	
	sun.util.locale.provider.LocaleProviderAdapter.getAdapter(java.lang.Class<? extends java.util.spi.LocaleServiceProvider>, java.util.Locale) line: 258	
	java.text.DecimalFormatSymbols.getInstance(java.util.Locale) line: 180	
	java.util.Formatter.getZero(java.util.Locale) line: 2453	
	java.util.Formatter.<init>(java.util.Locale, java.lang.Appendable) line: 1972	
	java.util.Formatter.<init>() line: 1994	
	java.lang.String.format(java.lang.String, java.lang.Object...) line: 3290	
	org.junit.platform.engine.UniqueIdFormat.<init>(char, char, char, char) line: 74	
	org.junit.platform.engine.UniqueIdFormat.<clinit>() line: 42	
	org.junit.platform.engine.UniqueId.parse(java.lang.String) line: 53	
	org.junit.platform.engine.discovery.DiscoverySelectors.selectUniqueId(java.lang.String) line: 696	
	org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createUniqueIdTest(java.lang.String, java.lang.String[][]) line: 100	
	org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.loadTests(java.lang.Class<?>[], java.lang.String, java.lang.String[], java.lang.String[], java.lang.String[][], java.lang.String, org.eclipse.jdt.internal.junit.runner.RemoteTestRunner) line: 44	
	org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(java.lang.String[], java.lang.String, org.eclipse.jdt.internal.junit.runner.TestExecution) line: 513	
	org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(org.eclipse.jdt.internal.junit.runner.TestExecution) line: 756 line: 452	
	org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(java.lang.String[]) line: 210	

comment:12 by Don-vip, 3 years ago

In 17967/josm:

see #19888 - make sure java.locale.providers is set early to SPI,JRE,CLDR for unit tests with Java >= 9 (before JUnit itself initializes Java locales)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.