diff options
author | Sree Kuchibhotla <sreek@google.com> | 2016-05-11 08:35:25 -0700 |
---|---|---|
committer | Sree Kuchibhotla <sreek@google.com> | 2016-05-11 08:35:25 -0700 |
commit | 088891119f17b827b4f45f09e39411f007618ddf (patch) | |
tree | fbb1e9f4731e209f6b6184da9d9333b39c7f6405 /test/cpp/interop/stress_interop_client.h | |
parent | 8dbe2cb071d90942c7bbe5987151f04955b9e9cb (diff) | |
parent | 1fc79fccf4f78e39032dc51d2fba26ba0f706bef (diff) |
Merge branch 'master' into server_channel_affinity
Diffstat (limited to 'test/cpp/interop/stress_interop_client.h')
-rw-r--r-- | test/cpp/interop/stress_interop_client.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/test/cpp/interop/stress_interop_client.h b/test/cpp/interop/stress_interop_client.h index cb0cd98821..aa93b58b4a 100644 --- a/test/cpp/interop/stress_interop_client.h +++ b/test/cpp/interop/stress_interop_client.h @@ -49,7 +49,6 @@ namespace testing { using std::pair; using std::vector; -// TODO(sreek): Add more test cases here in future enum TestCaseType { UNKNOWN_TEST = -1, EMPTY_UNARY = 0, @@ -57,7 +56,16 @@ enum TestCaseType { LARGE_COMPRESSED_UNARY = 2, CLIENT_STREAMING = 3, SERVER_STREAMING = 4, - EMPTY_STREAM = 5 + SERVER_COMPRESSED_STREAMING = 5, + SLOW_CONSUMER = 6, + HALF_DUPLEX = 7, + PING_PONG = 8, + CANCEL_AFTER_BEGIN = 9, + CANCEL_AFTER_FIRST_RESPONSE = 10, + TIMEOUT_ON_SLEEPING_SERVER = 11, + EMPTY_STREAM = 12, + STATUS_CODE_AND_MESSAGE = 13, + CUSTOM_METADATA = 14 }; const vector<pair<TestCaseType, grpc::string>> kTestCaseList = { @@ -66,7 +74,16 @@ const vector<pair<TestCaseType, grpc::string>> kTestCaseList = { {LARGE_COMPRESSED_UNARY, "large_compressed_unary"}, {CLIENT_STREAMING, "client_streaming"}, {SERVER_STREAMING, "server_streaming"}, - {EMPTY_STREAM, "empty_stream"}}; + {SERVER_COMPRESSED_STREAMING, "server_compressed_streaming"}, + {SLOW_CONSUMER, "slow_consumer"}, + {HALF_DUPLEX, "half_duplex"}, + {PING_PONG, "ping_pong"}, + {CANCEL_AFTER_BEGIN, "cancel_after_begin"}, + {CANCEL_AFTER_FIRST_RESPONSE, "cancel_after_first_response"}, + {TIMEOUT_ON_SLEEPING_SERVER, "timeout_on_sleeping_server"}, + {EMPTY_STREAM, "empty_stream"}, + {STATUS_CODE_AND_MESSAGE, "status_code_and_message"}, + {CUSTOM_METADATA, "custom_metadata"}}; class WeightedRandomTestSelector { public: @@ -87,14 +104,15 @@ class 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 test_duration_secs, long sleep_duration_ms, + bool do_not_abort_on_transient_failures); // The main function. Use this as the thread entry point. // qps_gauge is the QpsGauge to record the requests per second metric void MainLoop(std::shared_ptr<QpsGauge> qps_gauge); private: - void RunTest(TestCaseType test_case); + bool RunTest(TestCaseType test_case); int test_id_; const grpc::string& server_address_; |