From dc03bdf24fc771087c84bb80343ab479d7803a49 Mon Sep 17 00:00:00 2001 From: Julien Ponge Date: Mon, 13 Dec 2021 19:04:01 +0100 Subject: [PATCH] Fix incorrect Mutiny subscription APIs The test was using private APIs. --- .../io/quarkus/grpc/server/devmode/GrpcDevModeTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/grpc/deployment/src/test/java/io/quarkus/grpc/server/devmode/GrpcDevModeTest.java b/extensions/grpc/deployment/src/test/java/io/quarkus/grpc/server/devmode/GrpcDevModeTest.java index ba79bfa7be652..aa12fe4602574 100644 --- a/extensions/grpc/deployment/src/test/java/io/quarkus/grpc/server/devmode/GrpcDevModeTest.java +++ b/extensions/grpc/deployment/src/test/java/io/quarkus/grpc/server/devmode/GrpcDevModeTest.java @@ -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 @@ -135,14 +134,14 @@ private CompletionStage callEcho(String name, List output) { .map(StreamsOuterClass.Item.Builder::build); Multi 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; }