Created
August 1, 2021 11:59
-
-
Save steliosfran/69a84413c963adbd5f01e076eb0cbff2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
fun `then the merged stream does not crash`() { | |
val waiter = Waiter() | |
RxJavaPlugins.setErrorHandler { | |
// Fail the test if we receive an exception in the error handler | |
waiter.fail("Error handler received an exception: $it") | |
} | |
Completable.mergeArray(completable1, completable2).test().await() | |
Timer().schedule(10) { | |
// Pass the test after 10ms if we don't receive an exception | |
waiter.resume() | |
} | |
// Await for waiter.resume() or waiter.fail() | |
waiter.await() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment