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() {
206206 }
207207
208208 @Test
209- fun testDoesntDispatchWhenUnnecessarilyWhenCollected () = runTest {
209+ fun testDoesntDispatchUnnecessarilyWhenCollected () = runTest {
210210 expect(1 )
211- var subscribed = false
212211 val myFlow = flow<Int > {
213212 expect(3 )
214- subscribed = true
215- yield ()
213+ yield () // In other words, testing that this will be the first suspension point in `collectLatest`.
216214 expect(5 )
217215 }
218216 launch(start = CoroutineStart .UNDISPATCHED ) {
@@ -223,6 +221,5 @@ class ChannelFlowTest : TestBase() {
223221 finish(6 )
224222 }
225223 expect(4 )
226- assertTrue(subscribed)
227224 }
228225}
You can’t perform that action at this time.
0 commit comments