Skip to content

Commit ec83195

Browse files
committed
Disable timing-sensitive test on Windows
1 parent 8f83057 commit ec83195

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package kotlinx.coroutines
22

33
import kotlinx.coroutines.testing.TestBase
4+
import kotlinx.coroutines.testing.isJavaAndWindows
45
import java.lang.ref.WeakReference
56
import kotlin.coroutines.AbstractCoroutineContextElement
67
import kotlin.coroutines.Continuation
@@ -74,6 +75,11 @@ class ThreadLocalCustomContinuationInterceptorTest : TestBase() {
7475
private var letThatSinkIn: Any = "What is my purpose? To frag the garbage collctor"
7576

7677
private fun ensureCoroutineContextGCed(coroutineContext: CoroutineContext, suspend: Boolean) {
78+
// Tests are pretty timing-sensitive and flake ehavily on our virtualized Windows environment
79+
if (isJavaAndWindows) {
80+
return
81+
}
82+
7783
fun forceGcUntilRefIsCleaned(ref: WeakReference<CoroutineName>) {
7884
while (ref.get() != null) {
7985
System.gc()

0 commit comments

Comments
 (0)