bbaldino
12/16/2020, 11:09 PMrunBlockingTest
and advanceUntilIdle
and I think it's fooling kotest into thinking the test has timed outbbaldino
12/16/2020, 11:10 PMTest did not complete within 600000ms
, but I watch the test and know it didn't sit for a minutebbaldino
12/16/2020, 11:13 PMrunBlockingTest
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 PMbbaldino
12/16/2020, 11:18 PMbbaldino
12/16/2020, 11:18 PMclass FooTest : ShouldSpec({
context("top") {
runBlockingTest {
context("middle") {
context("bottom") {
launch {
delay(Long.MAX_VALUE)
latch.countDown()
}
advanceUntilIdle()
should("something") {
latch.count shouldBe 0
}
}
}
}
}
})
bbaldino
12/16/2020, 11:18 PMTest did not complete within 600000ms
bbaldino
12/16/2020, 11:19 PMrunBlockingTest
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
Shalom Halbert
12/16/2020, 11:35 PMbbaldino
12/16/2020, 11:35 PMbbaldino
12/16/2020, 11:35 PM30000
, I see the same thingbbaldino
12/16/2020, 11:37 PMwithTimeout
is effectively done within runBlockingTest
, so advanceUntilIdle
goes until that finishes as wellbbaldino
12/16/2020, 11:38 PMrunBlockingTest
to within the "bottom" context
, it's finebbaldino
12/16/2020, 11:38 PMsam
12/16/2020, 11:48 PMbbaldino
12/16/2020, 11:48 PMsam
12/16/2020, 11:48 PMsam
12/16/2020, 11:48 PMbbaldino
12/16/2020, 11:48 PMbbaldino
12/16/2020, 11:48 PMsam
12/16/2020, 11:48 PMbbaldino
12/16/2020, 11:49 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 thinkbbaldino
12/16/2020, 11:50 PMshould
in this case?sam
12/16/2020, 11:50 PMsam
12/16/2020, 11:50 PMsam
12/16/2020, 11:50 PMbbaldino
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
bbaldino
12/16/2020, 11:51 PMsam
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