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 @@ -490,6 +490,8 @@ public void run(WhiteboxTestStage stage) throws InterruptedException {
490
490
491
491
// cumulative pending > Long.MAX_VALUE
492
492
stage .probe .expectErrorWithMessage (IllegalStateException .class , "3.17" );
493
+
494
+ env .verifyNoAsyncErrors (env .defaultTimeoutMillis ());
493
495
}
494
496
});
495
497
}
@@ -627,12 +629,22 @@ public void registerOnNext(T element) {
627
629
628
630
@ Override
629
631
public void registerOnComplete () {
630
- elements .complete ();
632
+ try {
633
+ elements .complete ();
634
+ } catch (IllegalStateException ex ) {
635
+ // "Queue full", onComplete was already called
636
+ env .flop ("subscriber::onComplete was called a second time, which is illegal according to Rule 1.7" );
637
+ }
631
638
}
632
639
633
640
@ Override
634
641
public void registerOnError (Throwable cause ) {
635
- error .complete (cause );
642
+ try {
643
+ error .complete (cause );
644
+ } catch (IllegalStateException ex ) {
645
+ // "Queue full", onError was already called
646
+ env .flop ("subscriber::onError was called a second time, which is illegal according to Rule 1.7" );
647
+ }
636
648
}
637
649
638
650
public T expectNext () throws InterruptedException {
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ public void verifyNoAsyncErrors() {
158
158
/** If {@code TestEnvironment#printlnDebug} is true, print debug message to std out. */
159
159
public void debug (String msg ) {
160
160
if (printlnDebug )
161
- System .out .println (msg );
161
+ System .out .println ("[TCK-DEBUG] " + msg );
162
162
}
163
163
164
164
// ---- classes ----
You can’t perform that action at this time.
0 commit comments