FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
The LocalDateTimeStringConverterTests expect that the default locale is en_US. When executing them on a machine with default locale de_DE, the tests fail as follows:
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_parser[0] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_parser(LocalDateTimeStringConverterTest.java:144)
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_null_parser[0] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_null_parser(LocalDateTimeStringConverterTest.java:152)
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_parser[1] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_parser(LocalDateTimeStringConverterTest.java:144)
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_null_parser[1] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_null_parser(LocalDateTimeStringConverterTest.java:152)
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_parser[2] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_parser(LocalDateTimeStringConverterTest.java:144)
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_null_parser[2] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_null_parser(LocalDateTimeStringConverterTest.java:152)
This can be fixed by adding an appropriate setup step that initialized the default locale to en_US as follows:
@BeforeClass
public static void initDefaultLocale(){
// tests require that default locale is English
Locale.setDefault(Locale.ENGLISH);
}
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
The LocalDateTimeStringConverterTests expect that the default locale is en_US. When executing them on a machine with default locale de_DE, the tests fail as follows:
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_parser[0] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_parser(LocalDateTimeStringConverterTest.java:144)
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_null_parser[0] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_null_parser(LocalDateTimeStringConverterTest.java:152)
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_parser[1] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_parser(LocalDateTimeStringConverterTest.java:144)
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_null_parser[1] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_null_parser(LocalDateTimeStringConverterTest.java:152)
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_parser[2] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_parser(LocalDateTimeStringConverterTest.java:144)
test.javafx.util.converter.LocalDateTimeStringConverterTest > converter_with_specified_formatter_and_null_parser[2] FAILED
org.junit.ComparisonFailure: expected:<12 Januar[y] 1985, 12:34:56> but was:<12 Januar[] 1985, 12:34:56>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at test.javafx.util.converter.LocalDateTimeStringConverterTest.converter_with_specified_formatter_and_null_parser(LocalDateTimeStringConverterTest.java:152)
This can be fixed by adding an appropriate setup step that initialized the default locale to en_US as follows:
@BeforeClass
public static void initDefaultLocale(){
// tests require that default locale is English
Locale.setDefault(Locale.ENGLISH);
}
REPRODUCIBILITY :
This bug can be reproduced always.
- relates to
-
JDK-8264061 LocalDateTimeStringConverterTest fails in Canada
- Resolved