diff options
Diffstat (limited to 'test/cpp/interop/stress_interop_client.cc')
-rw-r--r-- | test/cpp/interop/stress_interop_client.cc | 59 |
1 files changed, 49 insertions, 10 deletions
diff --git a/test/cpp/interop/stress_interop_client.cc b/test/cpp/interop/stress_interop_client.cc index f287a5aa3b..aa95682e74 100644 --- a/test/cpp/interop/stress_interop_client.cc +++ b/test/cpp/interop/stress_interop_client.cc @@ -84,11 +84,12 @@ StressTestInteropClient::StressTestInteropClient( int test_id, const grpc::string& server_address, std::shared_ptr<Channel> channel, const WeightedRandomTestSelector& test_selector, long test_duration_secs, - long sleep_duration_ms) + long sleep_duration_ms, bool do_not_abort_on_transient_failures) : test_id_(test_id), server_address_(server_address), channel_(channel), - interop_client_(new InteropClient(channel, false)), + interop_client_(new InteropClient(channel, false, + do_not_abort_on_transient_failures)), test_selector_(test_selector), test_duration_secs_(test_duration_secs), sleep_duration_ms_(sleep_duration_ms) {} @@ -126,31 +127,67 @@ void StressTestInteropClient::MainLoop(std::shared_ptr<QpsGauge> qps_gauge) { } } -// TODO(sree): Add all interop tests -void StressTestInteropClient::RunTest(TestCaseType test_case) { +bool StressTestInteropClient::RunTest(TestCaseType test_case) { + bool is_success = false; switch (test_case) { case EMPTY_UNARY: { - interop_client_->DoEmpty(); + is_success = interop_client_->DoEmpty(); break; } case LARGE_UNARY: { - interop_client_->DoLargeUnary(); + is_success = interop_client_->DoLargeUnary(); break; } case LARGE_COMPRESSED_UNARY: { - interop_client_->DoLargeCompressedUnary(); + is_success = interop_client_->DoLargeCompressedUnary(); break; } case CLIENT_STREAMING: { - interop_client_->DoRequestStreaming(); + is_success = interop_client_->DoRequestStreaming(); break; } case SERVER_STREAMING: { - interop_client_->DoResponseStreaming(); + is_success = interop_client_->DoResponseStreaming(); + break; + } + case SERVER_COMPRESSED_STREAMING: { + is_success = interop_client_->DoResponseCompressedStreaming(); + break; + } + case SLOW_CONSUMER: { + is_success = interop_client_->DoResponseStreamingWithSlowConsumer(); + break; + } + case HALF_DUPLEX: { + is_success = interop_client_->DoHalfDuplex(); + break; + } + case PING_PONG: { + is_success = interop_client_->DoPingPong(); + break; + } + case CANCEL_AFTER_BEGIN: { + is_success = interop_client_->DoCancelAfterBegin(); + break; + } + case CANCEL_AFTER_FIRST_RESPONSE: { + is_success = interop_client_->DoCancelAfterFirstResponse(); + break; + } + case TIMEOUT_ON_SLEEPING_SERVER: { + is_success = interop_client_->DoTimeoutOnSleepingServer(); break; } case EMPTY_STREAM: { - interop_client_->DoEmptyStream(); + is_success = interop_client_->DoEmptyStream(); + break; + } + case STATUS_CODE_AND_MESSAGE: { + is_success = interop_client_->DoStatusWithMessage(); + break; + } + case CUSTOM_METADATA: { + is_success = interop_client_->DoCustomMetadata(); break; } default: { @@ -159,6 +196,8 @@ void StressTestInteropClient::RunTest(TestCaseType test_case) { break; } } + + return is_success; } } // namespace testing |