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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user