RFR: 8272358: Some tests may fail when executed with other locales than the US

Alexey Ivanov aivanov at openjdk.java.net
Fri Oct 29 10:47:13 UTC 2021


On Fri, 29 Oct 2021 05:50:12 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> @aivanov-jdk Alexey do you have any comments or suggestions?

Sorry for my delayed reply. I have never used Russian locale when working with JDK, if I remember correctly, I even experienced JDK build failures with Russian locale.

To me, the change looks good: it makes the tests more stable, these updated tests should pass even if the current locale is different than the US. I believe it's a common practice, as it's mentioned in [Testing the JDK](https://openjdk.java.net/groups/build/doc/testing.html#non-us-locale):

> If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US.

However, I haven't tried running the tests under Russian or French locale yet.

As for translations, I believe the tests which specifically verify translations should also set the locale explicitly and check the expected output.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5098


More information about the compiler-dev mailing list