From a14198ba34347a58113a7093c3db0101410d99b3 Mon Sep 17 00:00:00 2001 From: Michael Hoisie Date: Tue, 17 Dec 2024 14:14:58 -0800 Subject: [PATCH] Remove unnecessary LooperMode annotations PAUSED LooperMode has been the default for many years, so it is unnecessary to specify it. Remove these annotations. --- .../google/firebase/appdistribution/impl/AabUpdaterTest.java | 3 --- .../google/firebase/messaging/FirebaseMessagingRoboTest.java | 3 --- .../firebase/messaging/FirebaseMessagingServiceRoboTest.java | 3 --- .../com/google/firebase/perf/metrics/AppStartTraceTest.java | 2 -- .../google/firebase/perf/util/FirstDrawDoneListenerTest.java | 2 -- .../google/firebase/sessions/SessionLifecycleServiceTest.kt | 3 --- 6 files changed, 16 deletions(-) diff --git a/firebase-appdistribution/src/test/java/com/google/firebase/appdistribution/impl/AabUpdaterTest.java b/firebase-appdistribution/src/test/java/com/google/firebase/appdistribution/impl/AabUpdaterTest.java index 8349bfc313b..b59b6081469 100644 --- a/firebase-appdistribution/src/test/java/com/google/firebase/appdistribution/impl/AabUpdaterTest.java +++ b/firebase-appdistribution/src/test/java/com/google/firebase/appdistribution/impl/AabUpdaterTest.java @@ -23,7 +23,6 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.robolectric.Shadows.shadowOf; -import static org.robolectric.annotation.LooperMode.Mode.PAUSED; import android.app.Activity; import android.net.Uri; @@ -54,11 +53,9 @@ import org.mockito.MockitoAnnotations; import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; -import org.robolectric.annotation.LooperMode; import org.robolectric.shadows.ShadowActivity; @RunWith(RobolectricTestRunner.class) -@LooperMode(PAUSED) public class AabUpdaterTest { private static final String TEST_URL = "https://test-url"; private static final String REDIRECT_TO_PLAY = "https://redirect-to-play-url"; diff --git a/firebase-messaging/src/test/java/com/google/firebase/messaging/FirebaseMessagingRoboTest.java b/firebase-messaging/src/test/java/com/google/firebase/messaging/FirebaseMessagingRoboTest.java index 64796aa9346..7d28b40c852 100644 --- a/firebase-messaging/src/test/java/com/google/firebase/messaging/FirebaseMessagingRoboTest.java +++ b/firebase-messaging/src/test/java/com/google/firebase/messaging/FirebaseMessagingRoboTest.java @@ -72,8 +72,6 @@ import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; -import org.robolectric.annotation.LooperMode; -import org.robolectric.annotation.LooperMode.Mode; import org.robolectric.shadows.ShadowLooper; /** @@ -84,7 +82,6 @@ */ @RunWith(RobolectricTestRunner.class) @Config(shadows = ShadowPreconditions.class) -@LooperMode(Mode.PAUSED) public final class FirebaseMessagingRoboTest { private static final String INVALID_TOPIC = "@invalid"; diff --git a/firebase-messaging/src/test/java/com/google/firebase/messaging/FirebaseMessagingServiceRoboTest.java b/firebase-messaging/src/test/java/com/google/firebase/messaging/FirebaseMessagingServiceRoboTest.java index be045bdb09a..731a27085c8 100644 --- a/firebase-messaging/src/test/java/com/google/firebase/messaging/FirebaseMessagingServiceRoboTest.java +++ b/firebase-messaging/src/test/java/com/google/firebase/messaging/FirebaseMessagingServiceRoboTest.java @@ -84,12 +84,9 @@ import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; import org.robolectric.android.controller.ServiceController; -import org.robolectric.annotation.LooperMode; -import org.robolectric.annotation.LooperMode.Mode; import org.robolectric.shadows.ShadowLooper; @RunWith(RobolectricTestRunner.class) -@LooperMode(Mode.PAUSED) public class FirebaseMessagingServiceRoboTest { // Constants are copied so that tests will break if these change diff --git a/firebase-perf/src/test/java/com/google/firebase/perf/metrics/AppStartTraceTest.java b/firebase-perf/src/test/java/com/google/firebase/perf/metrics/AppStartTraceTest.java index 36ae3d10116..424d6499274 100644 --- a/firebase-perf/src/test/java/com/google/firebase/perf/metrics/AppStartTraceTest.java +++ b/firebase-perf/src/test/java/com/google/firebase/perf/metrics/AppStartTraceTest.java @@ -57,12 +57,10 @@ import org.mockito.stubbing.Answer; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; -import org.robolectric.annotation.LooperMode; import org.robolectric.shadows.ShadowSystemClock; /** Unit tests for {@link AppStartTrace}. */ @RunWith(RobolectricTestRunner.class) -@LooperMode(LooperMode.Mode.PAUSED) public class AppStartTraceTest extends FirebasePerformanceTestBase { @Mock private Clock clock; diff --git a/firebase-perf/src/test/java/com/google/firebase/perf/util/FirstDrawDoneListenerTest.java b/firebase-perf/src/test/java/com/google/firebase/perf/util/FirstDrawDoneListenerTest.java index 76aad67e5b7..d99b71fddf6 100644 --- a/firebase-perf/src/test/java/com/google/firebase/perf/util/FirstDrawDoneListenerTest.java +++ b/firebase-perf/src/test/java/com/google/firebase/perf/util/FirstDrawDoneListenerTest.java @@ -38,11 +38,9 @@ import org.mockito.InOrder; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; -import org.robolectric.annotation.LooperMode; /** Unit tests for {@link FirstDrawDoneListener}. */ @RunWith(RobolectricTestRunner.class) -@LooperMode(LooperMode.Mode.PAUSED) public class FirstDrawDoneListenerTest { private View testView; diff --git a/firebase-sessions/src/test/kotlin/com/google/firebase/sessions/SessionLifecycleServiceTest.kt b/firebase-sessions/src/test/kotlin/com/google/firebase/sessions/SessionLifecycleServiceTest.kt index 682a9ddfbbb..d7ef715071a 100644 --- a/firebase-sessions/src/test/kotlin/com/google/firebase/sessions/SessionLifecycleServiceTest.kt +++ b/firebase-sessions/src/test/kotlin/com/google/firebase/sessions/SessionLifecycleServiceTest.kt @@ -42,13 +42,10 @@ import org.robolectric.Robolectric import org.robolectric.RobolectricTestRunner import org.robolectric.Shadows.shadowOf import org.robolectric.android.controller.ServiceController -import org.robolectric.annotation.LooperMode -import org.robolectric.annotation.LooperMode.Mode.PAUSED import org.robolectric.shadows.ShadowSystemClock @OptIn(ExperimentalCoroutinesApi::class) @MediumTest -@LooperMode(PAUSED) @RunWith(RobolectricTestRunner::class) internal class SessionLifecycleServiceTest {