Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kotlinx-coroutines-core/jvm/test/sync/MutexStressTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import kotlin.test.*

class MutexStressTest : TestBase() {
@Test
fun testStress() = runTest {
fun testStress() = runBlocking(Dispatchers.Default) {
val n = 1000 * stressTestMultiplier
val k = 100
var shared = 0
Expand Down
7 changes: 3 additions & 4 deletions kotlinx-coroutines-core/jvm/test/sync/SemaphoreStressTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ package kotlinx.coroutines.sync

import kotlinx.coroutines.*
import org.junit.Test
import org.junit.After
import kotlin.test.assertEquals

class SemaphoreStressTest : TestBase() {

@Test
fun stressTestAsMutex() = runTest {
fun stressTestAsMutex() = runBlocking(Dispatchers.Default) {
val n = 10_000 * stressTestMultiplier
val k = 100
var shared = 0
Expand All @@ -27,7 +26,7 @@ class SemaphoreStressTest : TestBase() {
}

@Test
fun stressTest() = runTest {
fun stressTest() = runBlocking(Dispatchers.Default) {
val n = 10_000 * stressTestMultiplier
val k = 100
val semaphore = Semaphore(10)
Expand All @@ -43,7 +42,7 @@ class SemaphoreStressTest : TestBase() {
}

@Test
fun stressCancellation() = runTest {
fun stressCancellation() = runBlocking(Dispatchers.Default) {
val n = 10_000 * stressTestMultiplier
val semaphore = Semaphore(1)
semaphore.acquire()
Expand Down