aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/interop/client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/interop/client.cc')
-rw-r--r--test/cpp/interop/client.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc
index 3fae443681..7bcf23c0eb 100644
--- a/test/cpp/interop/client.cc
+++ b/test/cpp/interop/client.cc
@@ -46,7 +46,7 @@ DEFINE_string(
"all : all test cases;\n"
"cancel_after_begin : cancel stream after starting it;\n"
"cancel_after_first_response: cancel on first response;\n"
- "channel_soak: sends 1000 rpcs, tearing down the channel each time;\n"
+ "channel_soak: sends 'soak_iterations' rpcs, rebuilds channel each time;\n"
"client_compressed_streaming : compressed request streaming with "
"client_compressed_unary : single compressed request;\n"
"client_streaming : request streaming with single response;\n"
@@ -61,7 +61,7 @@ DEFINE_string(
"per_rpc_creds: raw oauth2 access token on a single rpc;\n"
"ping_pong : full-duplex streaming;\n"
"response streaming;\n"
- "rpc_soak: sends 1000 large_unary rpcs;\n"
+ "rpc_soak: 'sends soak_iterations' large_unary rpcs;\n"
"server_compressed_streaming : single request with compressed "
"server_compressed_unary : single compressed response;\n"
"server_streaming : single request with response streaming;\n"
@@ -85,6 +85,10 @@ DEFINE_bool(do_not_abort_on_transient_failures, false,
"test is retried in case of transient failures (and currently the "
"interop tests are not retried even if this flag is set to true)");
+DEFINE_int32(soak_iterations, 1000,
+ "number of iterations to use for the two soak tests; rpc_soak and "
+ "channel_soak");
+
using grpc::testing::CreateChannelForTestCase;
using grpc::testing::GetServiceAccountJsonKey;
using grpc::testing::UpdateActions;
@@ -155,9 +159,10 @@ int main(int argc, char** argv) {
actions["cacheable_unary"] =
std::bind(&grpc::testing::InteropClient::DoCacheableUnary, &client);
actions["channel_soak"] =
- std::bind(&grpc::testing::InteropClient::DoChannelSoakTest, &client);
- actions["rpc_soak"] =
- std::bind(&grpc::testing::InteropClient::DoRpcSoakTest, &client);
+ std::bind(&grpc::testing::InteropClient::DoChannelSoakTest, &client,
+ FLAGS_soak_iterations);
+ actions["rpc_soak"] = std::bind(&grpc::testing::InteropClient::DoRpcSoakTest,
+ &client, FLAGS_soak_iterations);
UpdateActions(&actions);