You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class WrongMessageException(token: String) : RuntimeException("Token $token")
@Test
fun testWrongMessageExceptionInChannel() = runTest {
// Separate code path
val result = produce<Unit>(SupervisorJob() + Dispatchers.Unconfined) {
throw WrongMessageException("OK")
}
val ex = runCatching {
for (unit in result) {
// Iterator has a special code path
}
}.exceptionOrNull() ?: error("Expected to fail")
assertTrue(ex is WrongMessageException)
assertEquals("Token OK", ex.message)
}
The text was updated successfully, but these errors were encountered:
This is a rarely-reproducing leftover of #1631
Steps to reproduce:
The text was updated successfully, but these errors were encountered: