Make WithTimeoutOrNullTest.testInnerTimeout less likely to fail under load
diff --git a/common/kotlinx-coroutines-core-common/test/WithTimeoutOrNullTest.kt b/common/kotlinx-coroutines-core-common/test/WithTimeoutOrNullTest.kt
index 26bd555..aa73f5b 100644
--- a/common/kotlinx-coroutines-core-common/test/WithTimeoutOrNullTest.kt
+++ b/common/kotlinx-coroutines-core-common/test/WithTimeoutOrNullTest.kt
@@ -87,7 +87,6 @@
val value = withTimeoutOrNull(1) {
channel.receive()
}
-
assertNull(value)
}
@@ -99,11 +98,11 @@
}
@Test
- fun testInnerTimeoutTest() = runTest(
+ fun testInnerTimeout() = runTest(
expected = { it is CancellationException }
) {
- withTimeoutOrNull(200) {
- withTimeout(100) {
+ withTimeoutOrNull(1000) {
+ withTimeout(10) {
while (true) {
yield()
}
@@ -127,7 +126,7 @@
}
@Test
- fun testOuterTimeoutTest() = runTest {
+ fun testOuterTimeout() = runTest {
var counter = 0
val result = withTimeoutOrNull(250) {
while (true) {