diff --git a/app/src/sharedTest/java/org/oppia/android/app/player/exploration/ExplorationActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/player/exploration/ExplorationActivityTest.kt index 45acb596d07..3cecf389689 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/player/exploration/ExplorationActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/player/exploration/ExplorationActivityTest.kt @@ -237,11 +237,11 @@ class ExplorationActivityTest { testCoroutineDispatchers.registerIdlingResource() profileTestHelper.initializeProfiles() fakeOppiaClock.setFakeTimeMode(FakeOppiaClock.FakeTimeMode.MODE_UPTIME_MILLIS) - testCoroutineDispatchers.unregisterIdlingResource() } @After fun tearDown() { + testCoroutineDispatchers.unregisterIdlingResource() Intents.release() } diff --git a/app/src/sharedTest/java/org/oppia/android/app/player/state/StateFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/player/state/StateFragmentTest.kt index 7782d29c532..8be1ca22cb9 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/player/state/StateFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/player/state/StateFragmentTest.kt @@ -226,6 +226,7 @@ class StateFragmentTest { @After fun tearDown() { + testCoroutineDispatchers.unregisterIdlingResource() Intents.release() } @@ -5046,9 +5047,7 @@ class StateFragmentTest { Intents.init() setUpTestApplicationComponent() testCoroutineDispatchers.registerIdlingResource() - profileTestHelper.initializeProfiles().also { - testCoroutineDispatchers.unregisterIdlingResource() - } + profileTestHelper.initializeProfiles() // Initialize Glide such that all of its executors use the same shared dispatcher pool as the // rest of Oppia so that thread execution can be synchronized via Oppia's test coroutine