Closed PowerOfCreation closed 3 months ago
I tried coming up with a solution myself and this seems to be working in this small dummy project, but I have still to investigate if it's actually working with an existing large project and what issues might arise. I would really appreciate some help on how to do t his properly.
This is what I came up with: https://github.com/PowerOfCreation/KoinJUnit5ParallelExecution/commit/d8875e949fcd1c64802271670fe1b4dc4f1e8de5
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug According to the documentation it's possible to use JUnit 5 together with Koin by using Extension: https://insert-koin.io/docs/reference/koin-test/testing/#testing-with-junit5. I followed this guide and this works as expected. When enabling parallel execution I do face issues though, as one Thread reports "KoinApplication has not been started" and the next one "A Koin Application has already been started".
To Reproduce Steps to reproduce the behavior:
Expected behavior Both tests will run in parallel
Koin module and version:
koin-core:3.4.3
koin-test:3.4.3
koin-test-junit5:3.4.3
I'm using 3.4.3 as I read 3.5.0 has issues with JUnit 5.
Snippet or Sample project to help reproduce https://github.com/PowerOfCreation/KoinJUnit5ParallelExecution