Skip to content

Commit feb1d2e

Browse files
committed
Removes superfluous creation of processors for SubscriberWhiteboxVerification
1 parent 6efc7c6 commit feb1d2e

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

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

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public void untested_spec213_failingOnSignalInvocation() throws Exception {
344344
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.13
345345
@Override @Test
346346
public void required_spec213_onSubscribe_mustThrowNullPointerExceptionWhenParametersAreNull() throws Throwable {
347-
subscriberTest(new TestStageTestRun() {
347+
subscriberTestWithoutSetup(new TestStageTestRun() {
348348
@Override
349349
public void run(WhiteboxTestStage stage) throws Throwable {
350350

@@ -365,13 +365,18 @@ public void run(WhiteboxTestStage stage) throws Throwable {
365365
}// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.13
366366
@Override @Test
367367
public void required_spec213_onNext_mustThrowNullPointerExceptionWhenParametersAreNull() throws Throwable {
368-
subscriberTest(new TestStageTestRun() {
368+
subscriberTestWithoutSetup(new TestStageTestRun() {
369369
@Override
370370
public void run(WhiteboxTestStage stage) throws Throwable {
371371

372372
final Subscription subscription = new Subscription() {
373-
@Override public void request(final long elements) {}
374-
@Override public void cancel() {}
373+
@Override
374+
public void request(final long elements) {
375+
}
376+
377+
@Override
378+
public void cancel() {
379+
}
375380
};
376381

377382
{
@@ -380,7 +385,7 @@ public void run(WhiteboxTestStage stage) throws Throwable {
380385
sub.onSubscribe(subscription);
381386
try {
382387
sub.onNext(null);
383-
} catch(final NullPointerException expected) {
388+
} catch (final NullPointerException expected) {
384389
gotNPE = true;
385390
}
386391
assertTrue(gotNPE, "onNext(null) did not throw NullPointerException");
@@ -394,13 +399,18 @@ public void run(WhiteboxTestStage stage) throws Throwable {
394399
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.13
395400
@Override @Test
396401
public void required_spec213_onError_mustThrowNullPointerExceptionWhenParametersAreNull() throws Throwable {
397-
subscriberTest(new TestStageTestRun() {
402+
subscriberTestWithoutSetup(new TestStageTestRun() {
398403
@Override
399404
public void run(WhiteboxTestStage stage) throws Throwable {
400405

401406
final Subscription subscription = new Subscription() {
402-
@Override public void request(final long elements) {}
403-
@Override public void cancel() {}
407+
@Override
408+
public void request(final long elements) {
409+
}
410+
411+
@Override
412+
public void cancel() {
413+
}
404414
};
405415

406416
{
@@ -409,7 +419,7 @@ public void run(WhiteboxTestStage stage) throws Throwable {
409419
sub.onSubscribe(subscription);
410420
try {
411421
sub.onError(null);
412-
} catch(final NullPointerException expected) {
422+
} catch (final NullPointerException expected) {
413423
gotNPE = true;
414424
}
415425
assertTrue(gotNPE, "onError(null) did not throw NullPointerException");

0 commit comments

Comments
 (0)