File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
kotlinx-coroutines-core/common/test/flow/channels Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -206,13 +206,11 @@ class ChannelFlowTest : TestBase() {
206
206
}
207
207
208
208
@Test
209
- fun testDoesntDispatchWhenUnnecessarilyWhenCollected () = runTest {
209
+ fun testDoesntDispatchUnnecessarilyWhenCollected () = runTest {
210
210
expect(1 )
211
- var subscribed = false
212
211
val myFlow = flow<Int > {
213
212
expect(3 )
214
- subscribed = true
215
- yield ()
213
+ yield () // In other words, testing that this will be the first suspension point in `collectLatest`.
216
214
expect(5 )
217
215
}
218
216
launch(start = CoroutineStart .UNDISPATCHED ) {
@@ -223,6 +221,5 @@ class ChannelFlowTest : TestBase() {
223
221
finish(6 )
224
222
}
225
223
expect(4 )
226
- assertTrue(subscribed)
227
224
}
228
225
}
You can’t perform that action at this time.
0 commit comments