File tree 2 files changed +15
-3
lines changed
tck/src/main/java/org/reactivestreams/tck
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -493,6 +493,8 @@ public void run(WhiteboxTestStage stage) throws InterruptedException {
493
493
494
494
// cumulative pending > Long.MAX_VALUE
495
495
stage .probe .expectErrorWithMessage (IllegalStateException .class , "3.17" );
496
+
497
+ env .verifyNoAsyncErrors (env .defaultTimeoutMillis ());
496
498
}
497
499
});
498
500
}
@@ -626,12 +628,22 @@ public void registerOnNext(T element) {
626
628
627
629
@ Override
628
630
public void registerOnComplete () {
629
- elements .complete ();
631
+ try {
632
+ elements .complete ();
633
+ } catch (IllegalStateException ex ) {
634
+ // "Queue full"
635
+ env .flop ("subscriber::onComplete was called a second time, which is illegal according to Rule 1.7" );
636
+ }
630
637
}
631
638
632
639
@ Override
633
640
public void registerOnError (Throwable cause ) {
634
- error .complete (cause );
641
+ try {
642
+ error .complete (cause );
643
+ } catch (IllegalStateException ex ) {
644
+ // "Queue full", onError was already called
645
+ env .flop ("subscriber::onError was called a second time, which is illegal according to Rule 1.7" );
646
+ }
635
647
}
636
648
637
649
public T expectNext () throws InterruptedException {
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ public void verifyNoAsyncErrors() {
150
150
/** If {@code TestEnvironment#printlnDebug} is true, print debug message to std out. */
151
151
public void debug (String msg ) {
152
152
if (printlnDebug )
153
- System .out .println (msg );
153
+ System .out .println ("[TCK-DEBUG] " + msg );
154
154
}
155
155
156
156
// ---- classes ----
You can’t perform that action at this time.
0 commit comments