Any tips on testing the Flow from a ConflatedBroad...
# coroutines
a
Any tips on testing the Flow from a ConflatedBroadcastChannel? Seems like this test hangs,
Copy code
val ch = BroadcastChannel<Int>(Channel.CONFLATED)
var counter = 0
ch.asFlow().onEach { ++counter; yield() }.launchIn(this)
ch.offer(150)  // send random element
yield()

counter shouldBeExactly 1
this
in launchIn() is TestContext of kotest framework: https://github.com/kotest/kotest (probably single threaded) but I assume yielding will change the coroutine to the waiting coroutine, right?
f
#kotest
a
Don't think its really connected to the testing framework...(I'll try to cross-post)