I have replaced old io.kotlintest
with new io.kotest
dependency and imported it to all the tests. They pass when are run individually, but gradle task gradlew test
freezes on testDebugUnitTest
task.
> Task :myAppModule:testDebugUnitTest
Gradle Test Executor 1 -> ~~~ Kotest Configuration ~~~
Gradle Test Executor 1 -> -> Parallelism: 1 thread(s)
Gradle Test Executor 1 -> -> Default test timeout: 600000ms
Gradle Test Executor 1 -> -> Default test order: TestCaseOrder
Gradle Test Executor 1 -> -> Default isolation mode: IsolationMode
Gradle Test Executor 1 -> -> Global soft assertations: False
Gradle Test Executor 1 -> -> Write spec failure file: False
Gradle Test Executor 1 -> -> Fail on ignored tests: False
Gradle Test Executor 1 -> -> Spec execution order: LexicographicSpecExecutionOrder
Gradle Test Executor 1 -> -> Extensions
Gradle Test Executor 1 -> - io.kotest.core.extensions.SystemPropertyTagExtension
Gradle Test Executor 1 -> - io.kotest.core.extensions.RuntimeTagExtension
Gradle Test Executor 1 ->
If I run test
gradle task in debug mode the code stops on MessageHub
class in Gradle (v5.4.1) library. So it looks like multithreading issue (because the test runs only on one thread).
I have created cutsom ProjectComfig object:
package io.kotest.provided
import io.kotest.core.config.AbstractProjectConfig
object ProjectConfig : AbstractProjectConfig() {
private var started: Long = 0
override fun beforeAll() {
started = System.currentTimeMillis()
}
override fun afterAll() {
val time = System.currentTimeMillis() - started
println("overall time [ms]: $time")
}
override val parallelism: Int = 4
}
But the gradle task still runs with 1 thread. I have added this package in the module /src/test/kotlin/io/kotest/provided
directory.
P.S. I cannot use or create kotest
tag because I do not have 1500 reputation. :-(