mirror of
https://github.com/corda/corda.git
synced 2025-01-19 03:06:36 +00:00
Add explanatory comment to test
This commit is contained in:
parent
9a27a81670
commit
58a71d8d07
@ -334,10 +334,14 @@ class ObservablesTests {
|
||||
assertEquals(2, heartBeatOnError)
|
||||
}
|
||||
|
||||
/**
|
||||
* In this test FlowSafeSubscriber throws an OnNextFailedException which is a OnErrorNotImplementedException.
|
||||
* Because its underlying subscriber is not an ActionSubscriber, it will not be considered as a leaf FlowSafeSubscriber.
|
||||
*/
|
||||
@Test
|
||||
fun `throwing FlowSafeSubscriber at onNext will wrap with a Rx OnErrorNotImplementedException`() {
|
||||
val flowSafeSubscriber = FlowSafeSubscriber<Int>(Subscribers.create { throw IllegalStateException() })
|
||||
assertFailsWith<OnErrorNotImplementedException> {
|
||||
assertFailsWith<OnErrorNotImplementedException> { // actually fails with an OnNextFailedException
|
||||
flowSafeSubscriber.onNext(1)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user