-
Bug
-
Resolution: Unresolved
-
P4
-
18
-
None
A considerable portion of javadoc tests assume the locale of the system under test. Such a test typically compares the output with that of expected on an English locale.
A test must not assume the locale of the system under test. Otherwise, such a test might fail if the system under test has a different locale that the test assumes.
To defend against such failures, a test could combine either of these strategies:
* Report if the actual locale differs from the assumed one (e.g. throw SkippedException)
* Contain only locale-agnostic assertions (i.e. either both the expected and actual output are generated for the assumed locale or both are guaranteed to not change with a locale)
* Enforce the assumed locale by configuring the system under test
A test must not assume the locale of the system under test. Otherwise, such a test might fail if the system under test has a different locale that the test assumes.
To defend against such failures, a test could combine either of these strategies:
* Report if the actual locale differs from the assumed one (e.g. throw SkippedException)
* Contain only locale-agnostic assertions (i.e. either both the expected and actual output are generated for the assumed locale or both are guaranteed to not change with a locale)
* Enforce the assumed locale by configuring the system under test
- relates to
-
JDK-8283606 Tests may fail with zh locale on MacOS
-
- Resolved
-