vitrox1
01/02/2018, 3:37 PMlouiscad
01/02/2018, 3:38 PMrunBlocking {
...//your test with async code that you await
}
from kotlinx.coroutinesvitrox1
01/02/2018, 3:42 PMstreetsofboston
01/02/2018, 4:05 PMrunBlocking
and have my tests finish quicklylouiscad
01/02/2018, 4:08 PMrunBlocking
or similar means any exception in your tests that happens async or after any suspension point don't get caught silently! ❌ 🚨streetsofboston
01/02/2018, 4:10 PMdelay
and such.
I wonder if it is possible to catch exceptions when not using runBlocking when creating your own CoroutineContext.louiscad
01/02/2018, 4:11 PMstreetsofboston
01/02/2018, 4:14 PMTestCoroutineContext
to catch any thrown exception and have it report it.louiscad
01/02/2018, 6:12 PMrunBlocking { … }
has seen performance improvements in a very recent update (0.20 IIRC)