Merge "Set default locale in the testing environment to avoid flaky test" into sc-dev am: 3940e5293c
am: 4e55c543fa
am: 5175e915c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14782142 Change-Id: Iad932bcb4ccc9f1153fa1e61c019155705fe2e8a
This commit is contained in:
@@ -93,8 +93,9 @@ public final class BatteryChartPreferenceControllerTest {
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
org.robolectric.shadows.ShadowSettings.set24HourTimeFormat(false);
|
||||
MockitoAnnotations.initMocks(this);
|
||||
Locale.setDefault(new Locale("en_US"));
|
||||
org.robolectric.shadows.ShadowSettings.set24HourTimeFormat(false);
|
||||
mFeatureFactory = FakeFeatureFactory.setupForTest();
|
||||
mMetricsFeatureProvider = mFeatureFactory.metricsFeatureProvider;
|
||||
mContext = spy(RuntimeEnvironment.application);
|
||||
|
@@ -60,6 +60,8 @@ public final class ConvertUtilsTest {
|
||||
mContext = spy(RuntimeEnvironment.application);
|
||||
mFeatureFactory = FakeFeatureFactory.setupForTest();
|
||||
mPowerUsageFeatureProvider = mFeatureFactory.powerUsageFeatureProvider;
|
||||
Locale.setDefault(new Locale("en_US"));
|
||||
org.robolectric.shadows.ShadowSettings.set24HourTimeFormat(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user