Paul Woitaschek
10/30/2019, 8:55 PM@Test
fun experiment() = runBlockingTest {
PublishProcessor.create<Unit>()
.replay(1)
.refCount()
.asFlow()
.first()
}
This fails with java.lang.IllegalStateException: This job has not completed yet
oO
Can someone explan this?streetsofboston
10/30/2019, 9:31 PM@Test
fun experiment() = runBlockingTest {
flow<Unit> {
suspendCancellableCoroutine<Nothing> { }
}
.first()
}
first()
causes it. If you were to emit at least one item, it all works without an exception being thrownvoben
10/30/2019, 9:40 PMrunBlocking
instead?streetsofboston
10/30/2019, 9:45 PMrunBlockingTest
.Paul Woitaschek
10/30/2019, 10:23 PM