Happy Holidays people! I've run into some problems...
# koin
w
Happy Holidays people! I've run into some problems while writing tests with Robolectric. The first test case passes but when running more than one I get
org.koin.error.AlreadyStartedException: Koin has already been started!
Has anyone seen this before? 🙂
Update: I upgraded Koin and now I get
org.koin.error.BeanOverrideException: Try to override definition with Single [name='SomethingProvider',class='some.SomethingProvider'], but override is not allowed. Use 'override' option in your definition or module.
I overrode
onTerminate()
in my Application class and call
stopKoin()
from there. It seems to work fine! I hope this is a somewhat acceptable way of doing it
w
Thank you @mgrzechocinski for your help and constructive suggestions on what to do better
Anyway, I read the docs and I it seems good to me since it's only in "emulated process environments" I'm having trouble
j
are your test classes extending
AutoCloseKoinTest
?