thanksforallthefish
03/04/2019, 11:37 AM3.1
. Given this production class
class App {
companion object {
val threadLocal: ThreadLocal<String> = ThreadLocal()
}
val greeting: String
get() {
return threadLocal.get()
}
}
this test is successful in `3.1`m but fails in 3.2
and 3.3
import io.kotlintest.Description
import io.kotlintest.Spec
import io.kotlintest.shouldBe
import io.kotlintest.specs.StringSpec
class AppIntegrationTest : StringSpec() {
override fun beforeSpec(description: Description, spec: Spec) {
App.threadLocal.set("test")
}
init {
"greetings" {
App().greeting shouldBe "test"
}
}
}
thanksforallthefish
03/04/2019, 11:39 AM3.1
was running tests in kotlintest
thread, while 3.2+
is using a thread pool. can I configure thread pool for kotlintest?thanksforallthefish
03/04/2019, 11:44 AMplugins {
val kotlinVersion = "1.3.21"
kotlin("jvm") version kotlinVersion
}
repositories {
jcenter()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.1+")
}