Make robotest less flaky
Change-Id: Ic9ed1ccbb7b7f802b6a5cf915aeb96c799007a7d Fixes: 67307841 Test: rerun robotest
This commit is contained in:
@@ -17,7 +17,6 @@
|
|||||||
package com.android.settings.development;
|
package com.android.settings.development;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
|
|
||||||
import static org.mockito.Mockito.doReturn;
|
import static org.mockito.Mockito.doReturn;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.spy;
|
import static org.mockito.Mockito.spy;
|
||||||
@@ -51,11 +50,7 @@ import org.robolectric.util.ReflectionHelpers;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@RunWith(SettingsRobolectricTestRunner.class)
|
||||||
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION,
|
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
|
||||||
shadows = {
|
|
||||||
SettingsShadowResources.class,
|
|
||||||
SettingsShadowResources.SettingsShadowTheme.class
|
|
||||||
})
|
|
||||||
public class DevelopmentSettingsDashboardFragmentTest {
|
public class DevelopmentSettingsDashboardFragmentTest {
|
||||||
|
|
||||||
private SwitchBar mSwitchBar;
|
private SwitchBar mSwitchBar;
|
||||||
@@ -100,6 +95,10 @@ public class DevelopmentSettingsDashboardFragmentTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Config(shadows = {
|
||||||
|
SettingsShadowResources.class,
|
||||||
|
SettingsShadowResources.SettingsShadowTheme.class
|
||||||
|
})
|
||||||
public void searchIndex_pageDisabled_shouldAddAllKeysToNonIndexable() {
|
public void searchIndex_pageDisabled_shouldAddAllKeysToNonIndexable() {
|
||||||
final Context appContext = RuntimeEnvironment.application;
|
final Context appContext = RuntimeEnvironment.application;
|
||||||
DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(appContext, false);
|
DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(appContext, false);
|
||||||
|
Reference in New Issue
Block a user