Move the Robolectric shadow config up.
In my testing, this reduces the runtime of the Robolectric Settings test suite on my Z840 workstation from 440 seconds to 402 seconds on average. By avoiding having a method-level Robolectric shadow import, we avoid going down a code path which needs to add more shadows later in the Robolectric execution. Bug: 64808827 Test: Settings robotests still pass Change-Id: I7b40d73b30306ae3f9759281afbd7f7266579e24
This commit is contained in:
@@ -45,7 +45,11 @@ import org.robolectric.annotation.Config;
|
||||
import java.util.List;
|
||||
|
||||
@RunWith(SettingsRobolectricTestRunner.class)
|
||||
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
|
||||
@Config(
|
||||
manifest = TestConfig.MANIFEST_PATH,
|
||||
sdk = TestConfig.SDK_VERSION,
|
||||
shadows = ShadowUtils.class
|
||||
)
|
||||
public class DeviceInfoSettingsTest {
|
||||
|
||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
||||
@@ -83,7 +87,6 @@ public class DeviceInfoSettingsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(shadows = ShadowUtils.class)
|
||||
public void testNonIndexableKeys_existInXmlLayout() {
|
||||
final Context context = RuntimeEnvironment.application;
|
||||
final List<String> niks = DeviceInfoSettings.SEARCH_INDEX_DATA_PROVIDER
|
||||
|
Reference in New Issue
Block a user