@@ -121,7 +121,7 @@ public void unaryCall(Messages.SimpleRequest request, Completable<Messages.Simpl
121121 public void testUnary_FutureReturn (TestContext should ) throws Exception {
122122 // Create gRPC Server
123123 GrpcServer grpcServer = grpcServer ();
124- grpcServer .addService (TestServiceGrpcService . of (new TestServiceService () {
124+ grpcServer .addService (testService (new TestServiceService () {
125125 @ Override
126126 public Future <Messages .SimpleResponse > unaryCall (Messages .SimpleRequest request ) {
127127 return Future .succeededFuture (Messages .SimpleResponse .newBuilder ()
@@ -152,7 +152,7 @@ public Future<Messages.SimpleResponse> unaryCall(Messages.SimpleRequest request)
152152 public void testUnary_FutureReturn_ErrorHandling (TestContext should ) throws Exception {
153153 // Create gRPC Server
154154 GrpcServer grpcServer = grpcServer ();
155- grpcServer .addService (TestServiceGrpcService . of (new TestServiceService () {
155+ grpcServer .addService (testService (new TestServiceService () {
156156 @ Override
157157 public Future <Messages .SimpleResponse > unaryCall (Messages .SimpleRequest request ) {
158158 throw new RuntimeException ("Simulated error" );
@@ -173,7 +173,7 @@ public Future<Messages.SimpleResponse> unaryCall(Messages.SimpleRequest request)
173173 .onComplete (should .asyncAssertFailure (err -> {
174174 should .assertTrue (err instanceof InvalidStatusException );
175175 InvalidStatusException ise = (InvalidStatusException ) err ;
176- should .assertEquals (GrpcStatus .INTERNAL , ise .actualStatus ());
176+ should .assertEquals (GrpcStatus .UNKNOWN , ise .actualStatus ());
177177 test .complete ();
178178 }));
179179 test .awaitSuccess ();
@@ -183,7 +183,7 @@ public Future<Messages.SimpleResponse> unaryCall(Messages.SimpleRequest request)
183183 public void testManyUnary_PromiseArg (TestContext should ) throws Exception {
184184 // Create gRPC Server
185185 GrpcServer grpcServer = grpcServer ();
186- grpcServer .addService (TestServiceGrpcService . of (new TestServiceService () {
186+ grpcServer .addService (testService (new TestServiceService () {
187187 @ Override
188188 public void streamingInputCall (ReadStream <Messages .StreamingInputCallRequest > request , Completable <Messages .StreamingInputCallResponse > response ) {
189189 List <Messages .StreamingInputCallRequest > list = new ArrayList <>();
@@ -225,7 +225,7 @@ public void streamingInputCall(ReadStream<Messages.StreamingInputCallRequest> re
225225 public void testManyUnary_FutureReturn (TestContext should ) throws Exception {
226226 // Create gRPC Server
227227 GrpcServer grpcServer = grpcServer ();
228- grpcServer .addService (TestServiceGrpcService . of (new TestServiceService () {
228+ grpcServer .addService (testService (new TestServiceService () {
229229 @ Override
230230 public Future <Messages .StreamingInputCallResponse > streamingInputCall (ReadStream <Messages .StreamingInputCallRequest > request ) {
231231 Promise <Messages .StreamingInputCallResponse > promise = Promise .promise ();
@@ -269,7 +269,7 @@ public Future<Messages.StreamingInputCallResponse> streamingInputCall(ReadStream
269269 public void testManyUnary_FutureReturn_ErrorHandling (TestContext should ) throws Exception {
270270 // Create gRPC Server
271271 GrpcServer grpcServer = grpcServer ();
272- grpcServer .addService (TestServiceGrpcService . of (new TestServiceService () {
272+ grpcServer .addService (testService (new TestServiceService () {
273273 @ Override
274274 public Future <Messages .StreamingInputCallResponse > streamingInputCall (ReadStream <Messages .StreamingInputCallRequest > request ) {
275275 throw new RuntimeException ("Simulated error" );
@@ -296,7 +296,7 @@ public Future<Messages.StreamingInputCallResponse> streamingInputCall(ReadStream
296296 .onComplete (should .asyncAssertFailure (err -> {
297297 should .assertTrue (err instanceof InvalidStatusException );
298298 InvalidStatusException ise = (InvalidStatusException ) err ;
299- should .assertEquals (GrpcStatus .INTERNAL , ise .actualStatus ());
299+ should .assertEquals (GrpcStatus .UNKNOWN , ise .actualStatus ());
300300 test .complete ();
301301 }));
302302 test .awaitSuccess ();
@@ -306,7 +306,7 @@ public Future<Messages.StreamingInputCallResponse> streamingInputCall(ReadStream
306306 public void testUnaryMany_WriteStreamArg (TestContext should ) throws Exception {
307307 // Create gRPC Server
308308 GrpcServer grpcServer = grpcServer ();
309- grpcServer .addService (TestServiceGrpcService . of (new TestServiceService () {
309+ grpcServer .addService (testService (new TestServiceService () {
310310 @ Override
311311 public void streamingOutputCall (Messages .StreamingOutputCallRequest request , WriteStream <Messages .StreamingOutputCallResponse > response ) {
312312 response .write (Messages .StreamingOutputCallResponse .newBuilder ()
@@ -347,7 +347,7 @@ public void streamingOutputCall(Messages.StreamingOutputCallRequest request, Wri
347347 public void testUnaryMany_ReadStreamReturn (TestContext should ) throws Exception {
348348 // Create gRPC Server
349349 GrpcServer grpcServer = grpcServer ();
350- grpcServer .addService (TestServiceGrpcService . of (new TestServiceService () {
350+ grpcServer .addService (testService (new TestServiceService () {
351351 @ Override
352352 protected void streamingOutputCall (Messages .StreamingOutputCallRequest request , WriteStream <Messages .StreamingOutputCallResponse > response ) {
353353 response .write (Messages .StreamingOutputCallResponse .newBuilder ()
@@ -388,7 +388,7 @@ protected void streamingOutputCall(Messages.StreamingOutputCallRequest request,
388388 public void testUnaryMany_ReadStreamReturn_ErrorHandling (TestContext should ) throws Exception {
389389 // Create gRPC Server
390390 GrpcServer grpcServer = grpcServer ();
391- grpcServer .addService (TestServiceGrpcService . of (new TestServiceService () {
391+ grpcServer .addService (testService (new TestServiceService () {
392392 @ Override
393393 protected void streamingOutputCall (Messages .StreamingOutputCallRequest request , WriteStream <Messages .StreamingOutputCallResponse > response ) {
394394 throw new RuntimeException ("Simulated error" );
@@ -408,7 +408,7 @@ protected void streamingOutputCall(Messages.StreamingOutputCallRequest request,
408408 .build ();
409409 client .streamingOutputCall (request )
410410 .onComplete (should .asyncAssertFailure (err -> {
411- should .assertEquals ("Invalid status: actual:INTERNAL , expected:OK" , err .getMessage ());
411+ should .assertEquals ("Invalid status: actual:UNKNOWN , expected:OK" , err .getMessage ());
412412 test .complete ();
413413 }));
414414 test .awaitSuccess ();
@@ -418,7 +418,7 @@ protected void streamingOutputCall(Messages.StreamingOutputCallRequest request,
418418 public void testmanyMany_WriteStreamArg (TestContext should ) throws Exception {
419419 // Create gRPC Server
420420 GrpcServer grpcServer = grpcServer ();
421- grpcServer .addService (TestServiceGrpcService . of (new TestServiceService () {
421+ grpcServer .addService (testService (new TestServiceService () {
422422 @ Override
423423 public void fullDuplexCall (ReadStream <Messages .StreamingOutputCallRequest > request , WriteStream <Messages .StreamingOutputCallResponse > response ) {
424424 request .endHandler ($ -> {
@@ -466,7 +466,7 @@ public void fullDuplexCall(ReadStream<Messages.StreamingOutputCallRequest> reque
466466 public void testmanyMany_ReadStreamReturn (TestContext should ) throws Exception {
467467 // Create gRPC Server
468468 GrpcServer grpcServer = grpcServer ();
469- grpcServer .addService (TestServiceGrpcService . of (new TestServiceService () {
469+ grpcServer .addService (testService (new TestServiceService () {
470470 @ Override
471471 protected void fullDuplexCall (ReadStream <Messages .StreamingOutputCallRequest > request , WriteStream <Messages .StreamingOutputCallResponse > response ) {
472472 request .endHandler ($ -> {
@@ -514,7 +514,7 @@ protected void fullDuplexCall(ReadStream<Messages.StreamingOutputCallRequest> re
514514 public void testmanyMany_ReadStreamReturn_ErrorHandling (TestContext should ) throws Exception {
515515 // Create gRPC Server
516516 GrpcServer grpcServer = grpcServer ();
517- grpcServer .addService (TestServiceGrpcService . of (new TestServiceService () {
517+ grpcServer .addService (testService (new TestServiceService () {
518518 @ Override
519519 protected void fullDuplexCall (ReadStream <Messages .StreamingOutputCallRequest > request , WriteStream <Messages .StreamingOutputCallResponse > response ) {
520520 throw new RuntimeException ("Simulated error" );
@@ -539,7 +539,7 @@ protected void fullDuplexCall(ReadStream<Messages.StreamingOutputCallRequest> re
539539 req .end ();
540540 })
541541 .onComplete (should .asyncAssertFailure (err -> {
542- should .assertEquals ("Invalid status: actual:INTERNAL , expected:OK" , err .getMessage ());
542+ should .assertEquals ("Invalid status: actual:UNKNOWN , expected:OK" , err .getMessage ());
543543 test .complete ();
544544 }));
545545 test .awaitSuccess ();
0 commit comments