We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 338c209 commit 24edb02Copy full SHA for 24edb02
kotlinx-coroutines-core/common/test/flow/operators/FlowOnTest.kt
@@ -346,9 +346,10 @@ class FlowOnTest : TestBase() {
346
fun testCancelledFlowOn() = runTest {
347
assertFailsWith<CancellationException> {
348
coroutineScope {
349
+ val scope = this
350
flow {
351
emit(Unit) // emit to buffer
- cancel() // now cancel
352
+ scope.cancel() // now cancel outer scope
353
}.flowOn(wrapperDispatcher()).collect {
354
// should not be reached, because cancelled before it runs
355
expectUnreached()
0 commit comments