Skip to content

Commit 52142d0

Browse files
authored
Dont run datetime tests with CLDR (#115849)
1 parent 41bf511 commit 52142d0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

server/src/test/java/org/elasticsearch/common/joda/JavaJodaTimeDuellingTests.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@ protected boolean enableWarningsCheck() {
4141

4242
@BeforeClass
4343
public static void checkJvmProperties() {
44+
String localeProviders = System.getProperty("java.locale.providers", "");
4445
boolean runtimeJdk8 = JavaVersion.current().getVersion().get(0) == 8;
45-
assert (runtimeJdk8 && (System.getProperty("java.locale.providers", "").equals("SPI,JRE")))
46-
|| (false == runtimeJdk8 && (System.getProperty("java.locale.providers", "").contains("SPI")))
46+
assert (runtimeJdk8 && localeProviders.equals("SPI,JRE")) || (false == runtimeJdk8 && localeProviders.contains("SPI"))
4747
: "`-Djava.locale.providers` needs to be set";
4848
assumeFalse(
49-
"won't work in jdk8 " + "because SPI mechanism is not looking at classpath - needs ISOCalendarDataProvider in jre's ext/libs",
49+
"won't work in jdk8 because SPI mechanism is not looking at classpath - needs ISOCalendarDataProvider in jre's ext/libs",
5050
runtimeJdk8
5151
);
52+
assumeFalse("CLDR messes up several datatime checks, ignore these", localeProviders.contains("CLDR"));
5253
}
5354

5455
public void testIncorrectFormat() {

0 commit comments

Comments
 (0)