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:
@@ -50,7 +50,11 @@ import org.robolectric.annotation.Implements;
|
||||
|
||||
|
||||
@RunWith(SettingsRobolectricTestRunner.class)
|
||||
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
|
||||
@Config(
|
||||
manifest = TestConfig.MANIFEST_PATH,
|
||||
sdk = TestConfig.SDK_VERSION,
|
||||
shadows = AccountHeaderPreferenceControllerTest.ShadowAuthenticatorHelper.class
|
||||
)
|
||||
public class AccountHeaderPreferenceControllerTest {
|
||||
|
||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
||||
@@ -83,7 +87,6 @@ public class AccountHeaderPreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(shadows = ShadowAuthenticatorHelper.class)
|
||||
public void onResume_shouldDisplayAccountInEntityHeader() {
|
||||
final Lifecycle lifecycle = new Lifecycle();
|
||||
final Account account = new Account("name1@abc.com", "com.abc");
|
||||
|
||||
Reference in New Issue
Block a user