File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
kotlinx-coroutines-core/jvm/test/sync Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import kotlin.test.*
9
9
10
10
class MutexStressTest : TestBase () {
11
11
@Test
12
- fun testStress () = runTest {
12
+ fun testStress () = runBlocking( Dispatchers . Default ) {
13
13
val n = 1000 * stressTestMultiplier
14
14
val k = 100
15
15
var shared = 0
Original file line number Diff line number Diff line change @@ -2,13 +2,12 @@ package kotlinx.coroutines.sync
2
2
3
3
import kotlinx.coroutines.*
4
4
import org.junit.Test
5
- import org.junit.After
6
5
import kotlin.test.assertEquals
7
6
8
7
class SemaphoreStressTest : TestBase () {
9
8
10
9
@Test
11
- fun stressTestAsMutex () = runTest {
10
+ fun stressTestAsMutex () = runBlocking( Dispatchers . Default ) {
12
11
val n = 10_000 * stressTestMultiplier
13
12
val k = 100
14
13
var shared = 0
@@ -27,7 +26,7 @@ class SemaphoreStressTest : TestBase() {
27
26
}
28
27
29
28
@Test
30
- fun stressTest () = runTest {
29
+ fun stressTest () = runBlocking( Dispatchers . Default ) {
31
30
val n = 10_000 * stressTestMultiplier
32
31
val k = 100
33
32
val semaphore = Semaphore (10 )
@@ -43,7 +42,7 @@ class SemaphoreStressTest : TestBase() {
43
42
}
44
43
45
44
@Test
46
- fun stressCancellation () = runTest {
45
+ fun stressCancellation () = runBlocking( Dispatchers . Default ) {
47
46
val n = 10_000 * stressTestMultiplier
48
47
val semaphore = Semaphore (1 )
49
48
semaphore.acquire()
You can’t perform that action at this time.
0 commit comments