diff options
Diffstat (limited to 'test/cpp/interop/client.cc')
-rw-r--r-- | test/cpp/interop/client.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 42d16f2f85..65ce2e9c2a 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -62,6 +62,8 @@ DEFINE_string(test_case, "large_unary", " streaming with slow client consumer; " "half_duplex : half-duplex streaming; " "ping_pong : full-duplex streaming; " + "cancel_after_begin : cancel stream after starting it; " + "cancel_after_first_response: cancel on first response; " "service_account_creds : large_unary with service_account auth; " "compute_engine_creds: large_unary with compute engine auth; " "jwt_token_creds: large_unary with JWT token auth; " @@ -76,8 +78,6 @@ using grpc::testing::CreateChannelForTestCase; using grpc::testing::GetServiceAccountJsonKey; int main(int argc, char** argv) { - grpc_init(); - grpc::testing::InitTest(&argc, &argv, true); int ret = 0; @@ -97,6 +97,10 @@ int main(int argc, char** argv) { client.DoHalfDuplex(); } else if (FLAGS_test_case == "ping_pong") { client.DoPingPong(); + } else if (FLAGS_test_case == "cancel_after_begin") { + client.DoCancelAfterBegin(); + } else if (FLAGS_test_case == "cancel_after_first_response") { + client.DoCancelAfterFirstResponse(); } else if (FLAGS_test_case == "service_account_creds") { grpc::string json_key = GetServiceAccountJsonKey(); client.DoServiceAccountCreds(json_key, FLAGS_oauth_scope); @@ -113,6 +117,8 @@ int main(int argc, char** argv) { client.DoResponseStreaming(); client.DoHalfDuplex(); client.DoPingPong(); + client.DoCancelAfterBegin(); + client.DoCancelAfterFirstResponse(); // service_account_creds and jwt_token_creds can only run with ssl. if (FLAGS_enable_ssl) { grpc::string json_key = GetServiceAccountJsonKey(); @@ -125,12 +131,11 @@ int main(int argc, char** argv) { GPR_ERROR, "Unsupported test case %s. Valid options are all|empty_unary|" "large_unary|client_streaming|server_streaming|half_duplex|ping_pong|" + "cancel_after_begin|cancel_after_first_response|" "service_account_creds|compute_engine_creds|jwt_token_creds", FLAGS_test_case.c_str()); ret = 1; } - client.Reset(nullptr); - grpc_shutdown(); return ret; } |