Skip to content

Commit 521972b

Browse files
akarnokdviktorklang
authored andcommitted
Remove code duplications
1 parent ee076ef commit 521972b

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

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

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,6 @@ public TestSetup apply(Long aLong) throws Throwable {
457457

458458
sub1.request(1);
459459
sub2.request(1);
460-
461-
sendError(ex);
462460
} else {
463461
sub1.request(1);
464462
expectRequest();
@@ -468,9 +466,9 @@ public TestSetup apply(Long aLong) throws Throwable {
468466

469467
// sub1 has received one element, and has one demand pending
470468
// sub2 has not yet requested anything
471-
472-
sendError(ex);
473469
}
470+
sendError(ex);
471+
474472
sub1.expectError(ex);
475473
sub2.expectError(ex);
476474

@@ -744,21 +742,16 @@ public TestSetup apply(Long subscribers) throws Throwable {
744742
final T z = sendNextTFromUpstream();
745743
expectNextElement(sub1, z);
746744
expectNextElement(sub2, z);
747-
748-
if (totalRequests == 3) {
749-
expectRequest();
750-
}
751745
} else {
752746
final T z = sendNextTFromUpstream();
753747
expectNextElement(sub1, z);
754748
sub2.expectNone(); // since sub2 hasn't requested anything yet
755749

756750
sub2.request(1);
757751
expectNextElement(sub2, z);
758-
759-
if (totalRequests == 3) {
760-
expectRequest();
761-
}
752+
}
753+
if (totalRequests == 3) {
754+
expectRequest();
762755
}
763756

764757
// to avoid error messages during test harness shutdown

0 commit comments

Comments
 (0)