Skip to content

Commit 8d4b33b

Browse files
authored
Merge pull request #375 from ktoso/wip-209-must-onSubscribe-ktoso
=tck #362 blackbox 209 must issue onSubscribe before any other signal
2 parents 0447764 + 404495c commit 8d4b33b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tck/src/main/java/org/reactivestreams/tck/SubscriberBlackboxVerification.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,16 @@ public void required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalW
291291
public void run(BlackboxTestStage stage) throws Throwable {
292292
final Publisher<T> pub = new Publisher<T>() {
293293
@Override
294-
public void subscribe(Subscriber<? super T> s) {
294+
public void subscribe(final Subscriber<? super T> s) {
295+
s.onSubscribe(new Subscription() {
296+
@Override public void request(long n) {
297+
// do nothing...
298+
}
299+
@Override public void cancel() {
300+
// do nothing...
301+
}
302+
});
303+
// immediately complete
295304
s.onComplete();
296305
}
297306
};

0 commit comments

Comments
 (0)