bbaldino
12/16/2020, 11:09 PMrunBlockingTest
and advanceUntilIdle
and I think it's fooling kotest into thinking the test has timed outTest did not complete within 600000ms
, but I watch the test and know it didn't sit for a minuterunBlockingTest
within the top context
block, maybe that's wrong. Trying to repro with a small example, maybe I'm doing something dumb.Shalom Halbert
12/16/2020, 11:15 PMbbaldino
12/16/2020, 11:16 PMclass FooTest : ShouldSpec({
context("top") {
runBlockingTest {
context("middle") {
context("bottom") {
launch {
delay(Long.MAX_VALUE)
latch.countDown()
}
advanceUntilIdle()
should("something") {
latch.count shouldBe 0
}
}
}
}
}
})
Test did not complete within 600000ms
runBlockingTest
gets used at some point by kotest to check for timeoutShalom Halbert
12/16/2020, 11:35 PMdelay
590000, doe the issue persist? You could be impacted by the the advanceUntilIdle
bbaldino
12/16/2020, 11:35 PM30000
, I see the same thingwithTimeout
is effectively done within runBlockingTest
, so advanceUntilIdle
goes until that finishes as wellrunBlockingTest
to within the "bottom" context
, it's finesam
12/16/2020, 11:48 PMbbaldino
12/16/2020, 11:48 PMsam
12/16/2020, 11:48 PMbbaldino
12/16/2020, 11:48 PMsam
12/16/2020, 11:48 PMbbaldino
12/16/2020, 11:49 PMwithTimeout
get applied for a test case?sam
12/16/2020, 11:49 PMbbaldino
12/16/2020, 11:49 PMwithTimeout
would have to be outside runBlockingTest
I thinkshould
in this case?sam
12/16/2020, 11:50 PMbbaldino
12/16/2020, 11:50 PMrunBlockingTest
wrapping a should
block ok.sam
12/16/2020, 11:50 PMbbaldino
12/16/2020, 11:50 PMcontext
sam
12/16/2020, 11:57 PMbbaldino
12/16/2020, 11:57 PMwithTimeout
must be run within the runBlockingTest
, so it becomes a child of that scope, so then advanceUntilIdle
advances until that finishes as well I thinksam
12/16/2020, 11:58 PM