Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

NTP Binding Tests Localization Fix #2407

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import org.junit.Test
*/
class NtpOSGiTest extends OSGiTest {
private static TimeZone systemTimeZone
private static Locale locale

private EventSubscriberMock eventSubscriberMock

Expand Down Expand Up @@ -97,13 +98,15 @@ class NtpOSGiTest extends OSGiTest {

@BeforeClass
public static void setUpClass(){
/* Store the initial system time zone value,
so that we can restore it at the test end.*/
/* Store the initial system time zone and locale value,
so that we can restore them at the test end.*/
systemTimeZone = TimeZone.getDefault()
locale = Locale.getDefault()

/* Set new default time zone,
/* Set new default time zone and locale,
which will be used during the tests execution.*/
TimeZone.setDefault(TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID))
Locale.setDefault(Locale.US)
}

@Before
Expand Down Expand Up @@ -143,8 +146,9 @@ class NtpOSGiTest extends OSGiTest {

@AfterClass
public static void tearDownClass(){
// Set the default time zone to its initial value.
// Set the default time zone and locale to their initial value.
TimeZone.setDefault(systemTimeZone)
Locale.setDefault(locale)
}

@Test
Expand Down