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

Commit 4ab4ff8b authored by Daniel Nishi's avatar Daniel Nishi
Browse files

Fix a flaky test.

If a test with an initialized fake factory was run before this test, it
passed. If it runs first, though, it would flake. By initializing the
fake factory in the test, it shouldn't flake anymore.

Change-Id: I3ecb7477b6b29d093059f01d5dc0124690fb15b3
Fixes: 62103876
Test: Robotests pass
parent a0d327a5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ public class AutomaticStorageManagerSwitchBarControllerTest {
        mSwitchBar = new SwitchBar(mContext);

        Context fakeContextForFakeProvider = mock(Context.class, RETURNS_DEEP_STUBS);
        FakeFeatureFactory.setupForTest(fakeContextForFakeProvider);
        FeatureFactory featureFactory = FakeFeatureFactory.getFactory(fakeContextForFakeProvider);
        mMetricsFeatureProvider = featureFactory.getMetricsFeatureProvider();
        mPreference = new Preference(mContext);