375 |
|
|
376 |
|
/** |
377 |
|
* Closing a publisher exceptionally causes onError to subscribers |
378 |
+ |
* after they are subscribed |
379 |
|
*/ |
380 |
|
public void testCloseExceptionallyError() { |
381 |
|
SubmissionPublisher<Integer> p = basicPublisher(); |
386 |
|
p.submit(1); |
387 |
|
p.closeExceptionally(new SPException()); |
388 |
|
assertTrue(p.isClosed()); |
389 |
+ |
s1.awaitSubscribe(); |
390 |
|
s1.awaitError(); |
391 |
|
assertTrue(s1.nexts <= 1); |
392 |
|
assertEquals(1, s1.errors); |
393 |
+ |
s1.awaitSubscribe(); |
394 |
|
s2.awaitError(); |
395 |
|
assertTrue(s2.nexts <= 1); |
396 |
|
assertEquals(1, s2.errors); |