You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating a project to use kotlinx.coroutines1.7.0-Beta, existing tests fail with a NoSuchMethodError for a runTest that's being called internally by the Compose test utilities.
The full stack trace looks like the following (but fail for every Compose test):
com.alexvanyo.composelife.resourcestate.ResourceStateComposableTests > collect_as_state_is_correct FAILED
java.lang.NoSuchMethodError: 'void kotlinx.coroutines.test.TestBuildersKt.runTest$default(kotlinx.coroutines.test.TestScope, long, kotlin.jvm.functions.Function2, int, java.lang.Object)'
at androidx.compose.ui.test.AndroidComposeUiTestEnvironment.withTestCoroutines(ComposeUiTest.android.kt:342)
at androidx.compose.ui.test.AndroidComposeUiTestEnvironment.access$withTestCoroutines(ComposeUiTest.android.kt:218)
at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$runTest$1$1$1.invoke(ComposeUiTest.android.kt:294)
at androidx.compose.ui.test.junit4.IdlingStrategy.withStrategy(IdlingStrategy.android.kt:52)
at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$runTest$1$1.invoke(ComposeUiTest.android.kt:293)
at androidx.compose.ui.test.junit4.IdlingResourceRegistry.withRegistry(IdlingResourceRegistry.jvm.kt:157)
at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$runTest$1.invoke(ComposeUiTest.android.kt:292)
at androidx.compose.ui.test.junit4.ComposeRootRegistry.withRegistry(ComposeRootRegistry.android.kt:146)
at androidx.compose.ui.test.AndroidComposeUiTestEnvironment.runTest(ComposeUiTest.android.kt:291)
at androidx.compose.ui.test.ComposeUiTest_androidKt.runAndroidComposeUiTest(ComposeUiTest.android.kt:107)
at androidx.compose.ui.test.ComposeUiTest_androidKt.runComposeUiTest(ComposeUiTest.android.kt:63)
at com.alexvanyo.composelife.resourcestate.ResourceStateComposableTests.collect_as_state_is_correct(ResourceStateComposableTests.kt:39)