diff --git a/src/main/java/com/google/api/generator/gapic/composer/ServiceClientTestClassComposer.java b/src/main/java/com/google/api/generator/gapic/composer/ServiceClientTestClassComposer.java index eb630063a7..3395d67121 100644 --- a/src/main/java/com/google/api/generator/gapic/composer/ServiceClientTestClassComposer.java +++ b/src/main/java/com/google/api/generator/gapic/composer/ServiceClientTestClassComposer.java @@ -1089,7 +1089,8 @@ private static MethodDefinition createStreamingRpcTestMethod( .setName("requestObserver") .build()); List callableMethodArgs = new ArrayList<>(); - if (!method.stream().equals(Method.Stream.BIDI)) { + if (!method.stream().equals(Method.Stream.BIDI) + && !method.stream().equals(Method.Stream.CLIENT)) { callableMethodArgs.add(requestVarExpr); } callableMethodArgs.add(responseObserverVarExpr); @@ -1361,7 +1362,8 @@ private static List createStreamingRpcExceptionTestStatements( .build()); List callableMethodArgs = new ArrayList<>(); - if (!method.stream().equals(Method.Stream.BIDI)) { + if (!method.stream().equals(Method.Stream.BIDI) + && !method.stream().equals(Method.Stream.CLIENT)) { callableMethodArgs.add(requestVarExpr); } callableMethodArgs.add(responseObserverVarExpr); diff --git a/src/test/java/com/google/api/generator/gapic/composer/goldens/EchoClientTest.golden b/src/test/java/com/google/api/generator/gapic/composer/goldens/EchoClientTest.golden index 85c18fddf6..216a007562 100644 --- a/src/test/java/com/google/api/generator/gapic/composer/goldens/EchoClientTest.golden +++ b/src/test/java/com/google/api/generator/gapic/composer/goldens/EchoClientTest.golden @@ -424,8 +424,7 @@ public class EchoClientTest { MockStreamObserver responseObserver = new MockStreamObserver<>(); ClientStreamingCallable callable = client.collectCallable(); - ApiStreamObserver requestObserver = - callable.clientStreamingCall(request, responseObserver); + ApiStreamObserver requestObserver = callable.clientStreamingCall(responseObserver); requestObserver.onNext(request); requestObserver.onCompleted(); @@ -449,8 +448,7 @@ public class EchoClientTest { MockStreamObserver responseObserver = new MockStreamObserver<>(); ClientStreamingCallable callable = client.collectCallable(); - ApiStreamObserver requestObserver = - callable.clientStreamingCall(request, responseObserver); + ApiStreamObserver requestObserver = callable.clientStreamingCall(responseObserver); requestObserver.onNext(request);