Skip to content

Commit 77f91e2

Browse files
committed
Fix
1 parent 1554d03 commit 77f91e2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

kotlinx-coroutines-core/jvm/test/MutexCancellationStressTest.kt

+2-6
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class MutexCancellationStressTest : TestBase() {
5555
delay(500)
5656
// If we've caught the completion after delay, then there is a chance no progress were made whatsoever, bail out
5757
if (completed.get()) return@launch
58-
val c = counterLocal.map { it.value }
58+
val c = counterLocal.map { it.get() }
5959
for (i in 0 until mutexJobNumber) {
6060
assert(c[i] > lastCounterLocalSnapshot[i]) { "No progress in MutexJob-$i, last observed state: ${c[i]}" }
6161
}
@@ -76,11 +76,7 @@ class MutexCancellationStressTest : TestBase() {
7676
cancellationJob.join()
7777
mutexJobs.forEach { it.join() }
7878
checkProgressJob.join()
79-
assertEquals(counter, counterLocal.sumOf { it.value })
79+
assertEquals(counter, counterLocal.sumOf { it.get() })
8080
dispatcher.close()
8181
}
8282
}
83-
84-
private inline var AtomicInteger.value
85-
get() = get()
86-
set(value) = set(value)

0 commit comments

Comments
 (0)