Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhalanskyjb committed Aug 5, 2024
1 parent ca34669 commit d32dfee
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class MutexCancellationStressTest : TestBase() {
delay(500)
// If we've caught the completion after delay, then there is a chance no progress were made whatsoever, bail out
if (completed.get()) return@launch
val c = counterLocal.map { it.value }
val c = counterLocal.map { it.get() }
for (i in 0 until mutexJobNumber) {
assert(c[i] > lastCounterLocalSnapshot[i]) { "No progress in MutexJob-$i, last observed state: ${c[i]}" }
}
Expand All @@ -76,11 +76,7 @@ class MutexCancellationStressTest : TestBase() {
cancellationJob.join()
mutexJobs.forEach { it.join() }
checkProgressJob.join()
assertEquals(counter, counterLocal.sumOf { it.value })
assertEquals(counter, counterLocal.sumOf { it.get() })
dispatcher.close()
}
}

private inline var AtomicInteger.value
get() = get()
set(value) = set(value)

0 comments on commit d32dfee

Please sign in to comment.