Skip to content

Commit 1097bc8

Browse files
committed
MPP: Fixed CommonAtomicCancellationTest
1 parent 79e02bb commit 1097bc8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/kotlinx-coroutines-core-common/src/test/kotlin/kotlinx/coroutines/experimental/CommonAtomicCancellationTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import kotlin.test.*
2020

2121
class CommonAtomicCancellationTest : TestBase() {
2222
@Test
23-
fun testCancellableLaunch() = runBlocking {
23+
fun testCancellableLaunch() = runTest {
2424
expect(1)
2525
val job = launch(coroutineContext) {
2626
expectUnreached() // will get cancelled before start
@@ -31,7 +31,7 @@ class CommonAtomicCancellationTest : TestBase() {
3131
}
3232

3333
@Test
34-
fun testAtomicLaunch() = runBlocking {
34+
fun testAtomicLaunch() = runTest {
3535
expect(1)
3636
val job = launch(coroutineContext, start = CoroutineStart.ATOMIC) {
3737
finish(4) // will execute even after it was cancelled
@@ -42,7 +42,7 @@ class CommonAtomicCancellationTest : TestBase() {
4242
}
4343

4444
@Test
45-
fun testDeferredAwaitCancellable() = runBlocking {
45+
fun testDeferredAwaitCancellable() = runTest {
4646
expect(1)
4747
val deferred = async(coroutineContext) { // deferred, not yet complete
4848
expect(4)
@@ -70,7 +70,7 @@ class CommonAtomicCancellationTest : TestBase() {
7070
}
7171

7272
@Test
73-
fun testJobJoinCancellable() = runBlocking {
73+
fun testJobJoinCancellable() = runTest {
7474
expect(1)
7575
val jobToJoin = launch(coroutineContext) { // not yet complete
7676
expect(4)

0 commit comments

Comments
 (0)