From cc2d376a93b67bd475adc3f7987f08ee0eb1951f Mon Sep 17 00:00:00 2001 From: Philippe Laflamme <484152+plaflamme@users.noreply.github.com> Date: Tue, 12 May 2020 20:44:09 -0400 Subject: [PATCH] interop-testing: adds assertions to empty_stream test case (#7030) If the server fails (e.g.: with an unimplemented status), the test still succeeds. This change adds assertions to check the status code as well as the expected number of responses. --- .../java/io/grpc/testing/integration/AbstractInteropTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java b/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java index 60a72b5f8d..b0d656f7de 100644 --- a/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java +++ b/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java @@ -790,6 +790,8 @@ public abstract class AbstractInteropTest { = asyncStub.fullDuplexCall(responseObserver); requestObserver.onCompleted(); responseObserver.awaitCompletion(operationTimeoutMillis(), TimeUnit.MILLISECONDS); + assertSuccess(responseObserver); + assertTrue("Expected an empty stream", responseObserver.getValues().isEmpty()); } @Test