Skip to content

Commit

Permalink
Fixed FlowOnTest after the merge of branches
Browse files Browse the repository at this point in the history
  • Loading branch information
elizarov committed Oct 12, 2020
1 parent 8773a26 commit 030aee4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,10 @@ class FlowOnTest : TestBase() {
fun testCancelledFlowOn() = runTest {
assertFailsWith<CancellationException> {
coroutineScope {
val scope = this
flow {
emit(Unit) // emit to buffer
cancel() // now cancel
scope.cancel() // now cancel outer scope
}.flowOn(wrapperDispatcher()).collect {
// should not be reached, because cancelled before it runs
expectUnreached()
Expand Down

0 comments on commit 030aee4

Please sign in to comment.