From ed7083c760481395a5bca77f9e59eeca67a498de Mon Sep 17 00:00:00 2001 From: Sunny Chung Date: Sat, 9 Nov 2024 00:30:20 +0800 Subject: [PATCH] fix ChunkedLatestFlowTest was failing in some runner --- .../hellohttp/test/util/ChunkedLatestFlowTest.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/jvmTest/kotlin/com/sunnychung/application/multiplatform/hellohttp/test/util/ChunkedLatestFlowTest.kt b/src/jvmTest/kotlin/com/sunnychung/application/multiplatform/hellohttp/test/util/ChunkedLatestFlowTest.kt index 9a92980c..7d075d93 100644 --- a/src/jvmTest/kotlin/com/sunnychung/application/multiplatform/hellohttp/test/util/ChunkedLatestFlowTest.kt +++ b/src/jvmTest/kotlin/com/sunnychung/application/multiplatform/hellohttp/test/util/ChunkedLatestFlowTest.kt @@ -2,8 +2,6 @@ package com.sunnychung.application.multiplatform.hellohttp.test.util import com.sunnychung.application.multiplatform.hellohttp.util.chunkedLatest import com.sunnychung.lib.multiplatform.kdatetime.extension.milliseconds -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.flow.flow @@ -26,10 +24,10 @@ class ChunkedLatestFlowTest { flow { (0..10).forEach { emit(it) - delay(145) + delay(1450) } } - .chunkedLatest(500.milliseconds()) + .chunkedLatest(5000.milliseconds()) .onEach { results += it } .launchIn(this) } @@ -47,12 +45,12 @@ class ChunkedLatestFlowTest { flow { (0..10).forEach { emit(it) - delay(145) + delay(1450) } emit(11) emit(12) } - .chunkedLatest(500.milliseconds()) + .chunkedLatest(5000.milliseconds()) .onEach { results += it } .launchIn(this) } @@ -70,10 +68,10 @@ class ChunkedLatestFlowTest { flow { (0..12).forEach { emit(it) - delay(145) + delay(1450) } } - .chunkedLatest(500.milliseconds()) + .chunkedLatest(5000.milliseconds()) .onEach { results += it } .launchIn(this) }