aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/interop/interop_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/interop/interop_client.cc')
-rw-r--r--test/cpp/interop/interop_client.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc
index 1668589cc4..d0dd0718aa 100644
--- a/test/cpp/interop/interop_client.cc
+++ b/test/cpp/interop/interop_client.cc
@@ -107,6 +107,11 @@ TestService::Stub* InteropClient::ServiceStub::Get() {
return stub_.get();
}
+UnimplementedService::Stub*
+InteropClient::ServiceStub::GetUnimplementedServiceStub() {
+ return UnimplementedService::NewStub(channel_).get();
+}
+
void InteropClient::ServiceStub::Reset(std::shared_ptr<Channel> channel) {
channel_ = channel;
@@ -1002,6 +1007,27 @@ bool InteropClient::DoCustomMetadata() {
return true;
}
+bool InteropClient::DoUnimplementedService() {
+ gpr_log(GPR_DEBUG, "Sending a request for an unimplemented service...");
+
+ Empty request = Empty::default_instance();
+ Empty response = Empty::default_instance();
+ ClientContext context;
+
+ UnimplementedService::Stub* stub =
+ serviceStub_.GetUnimplementedServiceStub();
+
+ Status s =
+ stub->UnimplementedCall(&context, request, &response);
+
+ if (!AssertStatusCode(s, StatusCode::UNIMPLEMENTED)) {
+ return false;
+ }
+
+ gpr_log(GPR_DEBUG, "unimplemented service done.");
+ return true;
+}
+
bool InteropClient::DoUnimplementedMethod() {
gpr_log(GPR_DEBUG, "Sending a request for an unimplemented rpc...");