Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3940e529 authored by YUKAI HUNG's avatar YUKAI HUNG Committed by Android (Google) Code Review
Browse files

Merge "Set default locale in the testing environment to avoid flaky test" into sc-dev

parents 25f79e30 7a6bd1e4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
+2 −0
Original line number Diff line number Diff line
@@ -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