Make robotest less flaky

Change-Id: Ic9ed1ccbb7b7f802b6a5cf915aeb96c799007a7d
Fixes: 67307841
Test: rerun robotest
This commit is contained in:
Fan Zhang
2017-10-02 13:10:08 -07:00
parent 2985a0775d
commit feaa82ce8f

View File

@@ -17,7 +17,6 @@
package com.android.settings.development;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
@@ -51,11 +50,7 @@ import org.robolectric.util.ReflectionHelpers;
import java.util.List;
@RunWith(SettingsRobolectricTestRunner.class)
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION,
shadows = {
SettingsShadowResources.class,
SettingsShadowResources.SettingsShadowTheme.class
})
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
public class DevelopmentSettingsDashboardFragmentTest {
private SwitchBar mSwitchBar;
@@ -100,6 +95,10 @@ public class DevelopmentSettingsDashboardFragmentTest {
}
@Test
@Config(shadows = {
SettingsShadowResources.class,
SettingsShadowResources.SettingsShadowTheme.class
})
public void searchIndex_pageDisabled_shouldAddAllKeysToNonIndexable() {
final Context appContext = RuntimeEnvironment.application;
DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(appContext, false);