Skip to content

Commit

Permalink
fix ChunkedLatestFlowTest was failing in some runner
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny-chung committed Nov 8, 2024
1 parent 0c02f50 commit ed7083c
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,10 +24,10 @@ class ChunkedLatestFlowTest {
flow<Int> {
(0..10).forEach {
emit(it)
delay(145)
delay(1450)
}
}
.chunkedLatest(500.milliseconds())
.chunkedLatest(5000.milliseconds())
.onEach { results += it }
.launchIn(this)
}
Expand All @@ -47,12 +45,12 @@ class ChunkedLatestFlowTest {
flow<Int> {
(0..10).forEach {
emit(it)
delay(145)
delay(1450)
}
emit(11)
emit(12)
}
.chunkedLatest(500.milliseconds())
.chunkedLatest(5000.milliseconds())
.onEach { results += it }
.launchIn(this)
}
Expand All @@ -70,10 +68,10 @@ class ChunkedLatestFlowTest {
flow<Int> {
(0..12).forEach {
emit(it)
delay(145)
delay(1450)
}
}
.chunkedLatest(500.milliseconds())
.chunkedLatest(5000.milliseconds())
.onEach { results += it }
.launchIn(this)
}
Expand Down

0 comments on commit ed7083c

Please sign in to comment.