Skip to content

Commit

Permalink
Merge pull request quarkusio#22161 from quarkusio/fix/grpc-devmode-te…
Browse files Browse the repository at this point in the history
…st-bad-mutiny-usage

Fix incorrect Mutiny subscription APIs
  • Loading branch information
michalszynkiewicz authored Dec 13, 2021
2 parents ab382fe + dc03bdf commit c7241e7
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import io.grpc.examples.helloworld.HelloRequest;
import io.quarkus.test.QuarkusDevModeTest;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.subscription.Subscribers;

public class GrpcDevModeTest {
@RegisterExtension
Expand Down Expand Up @@ -135,14 +134,14 @@ private CompletionStage<Boolean> callEcho(String name, List<String> output) {
.map(StreamsOuterClass.Item.Builder::build);
Multi<StreamsOuterClass.Item> echo = MutinyStreamsGrpc.newMutinyStub(channel)
.echo(request);
echo.subscribe().withSubscriber(Subscribers.from(
echo.subscribe().with(
s -> s.request(Long.MAX_VALUE),
item -> output.add(item.getName()),
error -> {
error.printStackTrace();
result.completeExceptionally(error);
},
() -> result.complete(true),
s -> s.request(Long.MAX_VALUE)));
() -> result.complete(true));
return result;
}

Expand Down

0 comments on commit c7241e7

Please sign in to comment.