Skip to content

Commit 44f52b8

Browse files
committed
Fix RunBlockingTest on single core machine
1 parent 6a3f17f commit 44f52b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/kotlinx-coroutines-core/test/RunBlockingTest.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ class RunBlockingTest : TestBase() {
6969

7070

7171
@Test
72-
fun testCancellation() {
73-
val job = launch(DefaultDispatcher) {
72+
fun testCancellation() = newFixedThreadPoolContext(2, "testCancellation").use {
73+
val job = launch(it) {
7474
runBlocking(coroutineContext) {
75-
while(true) {
75+
while (true) {
7676
yield()
7777
}
7878
}

0 commit comments

Comments
 (0)