Skip to content

Commit

Permalink
Fix broken tests not expecting new exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Bair <rbair23@users.noreply.github.com>
  • Loading branch information
rbair23 committed Nov 22, 2024
1 parent 69a20cd commit b45068b
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ void exceptionDuring_onNext_IsHandled() {
.build();

pipeline.onSubscribe(mock(Flow.Subscription.class));
pipeline.onNext(Bytes.wrap("hello"));
final var data = Bytes.wrap("hello");
assertThatThrownBy(() -> pipeline.onNext(data)).isInstanceOf(RuntimeException.class);
verify(replies).onError(any(RuntimeException.class));
}

Expand Down Expand Up @@ -309,7 +310,8 @@ void exceptionDuring_onNext_IsHandled() {
.build();

pipeline.onSubscribe(mock(Flow.Subscription.class));
pipeline.onNext(Bytes.wrap("hello"));
final var data = Bytes.wrap("hello");
assertThatThrownBy(() -> pipeline.onNext(data)).isInstanceOf(RuntimeException.class);
verify(replies).onError(any(RuntimeException.class));
}

Expand Down Expand Up @@ -448,7 +450,8 @@ void badRequestMapperCallsOnError() {
.build();

pipeline.onSubscribe(mock(Flow.Subscription.class));
pipeline.onNext(Bytes.wrap("hello"));
final var data = Bytes.wrap("hello");
assertThatThrownBy(() -> pipeline.onNext(data)).isInstanceOf(RuntimeException.class);
verify(replies).onError(ex);
}

Expand All @@ -463,7 +466,8 @@ void badMethodCallsOnError() {
.build();

pipeline.onSubscribe(mock(Flow.Subscription.class));
pipeline.onNext(Bytes.wrap("hello"));
final var data = Bytes.wrap("hello");
assertThatThrownBy(() -> pipeline.onNext(data)).isInstanceOf(RuntimeException.class);
verify(replies).onError(ex);
}

Expand Down Expand Up @@ -577,7 +581,8 @@ void badRequestMapperCallsOnError() {
.build();

pipeline.onSubscribe(mock(Flow.Subscription.class));
pipeline.onNext(Bytes.wrap("hello"));
final var data = Bytes.wrap("hello");
assertThatThrownBy(() -> pipeline.onNext(data)).isInstanceOf(RuntimeException.class);
verify(replies).onError(ex);
}

Expand Down

0 comments on commit b45068b

Please sign in to comment.