Allan Wang
06/17/2020, 9:29 AMjava.lang.IllegalStateException at KoinContextHandler.kt
From ./gradlew testDebug
? I’ve used koin before in a few projects and this one is internal. It extends AutoCloseKoinTest
and fails for certain files exactly every other time. Using ./gradlew clean testDebug
fixes it, but I’m not sure what the issue is. Curious if anyone has experienced the same thingtynn
06/17/2020, 3:58 PMAllan Wang
06/17/2020, 10:17 PMjava.lang.IllegalStateException: A KoinContext is already started
at org.koin.core.context.KoinContextHandler.register(KoinContextHandler.kt:49)
at org.koin.core.context.ContextFunctionsKt.startKoin(ContextFunctions.kt:36)
at org.koin.core.context.ContextFunctionsKt.startKoin$default(ContextFunctions.kt:35)
at [TestApplication].onCreate([TestApplication].kt:12)
at org.robolectric.android.internal.AndroidTestEnvironment.lambda$installAndCreateApplication$0(AndroidTestEnvironment.java:276)
at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:75)
at org.robolectric.android.internal.AndroidTestEnvironment.installAndCreateApplication(AndroidTestEnvironment.java:276)
at org.robolectric.android.internal.AndroidTestEnvironment.setUpApplicationState(AndroidTestEnvironment.java:169)
at org.robolectric.RobolectricTestRunner.beforeTest(RobolectricTestRunner.java:301)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$0(SandboxTestRunner.java:243)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:89)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Allan Wang
06/17/2020, 10:18 PMarnaud.giuliani
06/18/2020, 7:09 AMAllan Wang
06/18/2020, 7:53 PMAllan Wang
06/18/2020, 7:53 PM