You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: common/kotlinx-coroutines-core-common/src/test/kotlin/kotlinx/coroutines/experimental/CommonAtomicCancellationTest.kt
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ import kotlin.test.*
20
20
21
21
classCommonAtomicCancellationTest : TestBase() {
22
22
@Test
23
-
funtestCancellableLaunch() =runBlocking {
23
+
funtestCancellableLaunch() =runTest {
24
24
expect(1)
25
25
val job = launch(coroutineContext) {
26
26
expectUnreached() // will get cancelled before start
@@ -31,7 +31,7 @@ class CommonAtomicCancellationTest : TestBase() {
31
31
}
32
32
33
33
@Test
34
-
funtestAtomicLaunch() =runBlocking {
34
+
funtestAtomicLaunch() =runTest {
35
35
expect(1)
36
36
val job = launch(coroutineContext, start =CoroutineStart.ATOMIC) {
37
37
finish(4) // will execute even after it was cancelled
@@ -42,7 +42,7 @@ class CommonAtomicCancellationTest : TestBase() {
42
42
}
43
43
44
44
@Test
45
-
funtestDeferredAwaitCancellable() =runBlocking {
45
+
funtestDeferredAwaitCancellable() =runTest {
46
46
expect(1)
47
47
val deferred = async(coroutineContext) { // deferred, not yet complete
48
48
expect(4)
@@ -70,7 +70,7 @@ class CommonAtomicCancellationTest : TestBase() {
70
70
}
71
71
72
72
@Test
73
-
funtestJobJoinCancellable() =runBlocking {
73
+
funtestJobJoinCancellable() =runTest {
74
74
expect(1)
75
75
val jobToJoin = launch(coroutineContext) { // not yet complete
0 commit comments