diff options
author | Craig Tiller <ctiller@google.com> | 2017-10-06 08:46:39 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-10-06 08:46:39 -0700 |
commit | abecd39477e901ad060300a5df67e87469ddbb54 (patch) | |
tree | 272bdc6595ff2443220ebf8cfe914641611ac595 /test | |
parent | 50f473e2ffed9cbe8ee3ad5e5a9b345990b8c618 (diff) | |
parent | d059e1c43ced2279ea4594df04f62761d7b95a86 (diff) |
Merge github.com:grpc/grpc into flowctl+millis
Diffstat (limited to 'test')
-rw-r--r-- | test/cpp/end2end/async_end2end_test.cc | 9 | ||||
-rw-r--r-- | test/cpp/end2end/end2end_test.cc | 5 | ||||
-rw-r--r-- | test/cpp/interop/stress_test.cc | 7 |
3 files changed, 8 insertions, 13 deletions
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index e2531ef95a..f938aea40e 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -252,11 +252,8 @@ class TestScenario { bool disable_blocking; bool inproc; bool health_check_service; - // Although the below grpc::string's are logically const, we can't declare - // them const because of a limitation in the way old compilers (e.g., gcc-4.4) - // manage vector insertion using a copy constructor - grpc::string credentials_type; - grpc::string message_content; + const grpc::string credentials_type; + const grpc::string message_content; }; static std::ostream& operator<<(std::ostream& out, @@ -1784,7 +1781,7 @@ std::vector<TestScenario> CreateTestScenarios(bool test_disable_blocking, GPR_ASSERT(!credentials_types.empty()); messages.push_back("Hello"); - for (int sz = 1; sz < test_big_limit; sz *= 2) { + for (int sz = 1; sz <= test_big_limit; sz *= 32) { grpc::string big_msg; for (int i = 0; i < sz * 1024; i++) { char c = 'a' + (i % 26); diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 5dae5b014b..810ee303f2 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -198,10 +198,7 @@ class TestScenario { void Log() const; bool use_proxy; bool inproc; - // Although the below grpc::string is logically const, we can't declare - // them const because of a limitation in the way old compilers (e.g., gcc-4.4) - // manage vector insertion using a copy constructor - grpc::string credentials_type; + const grpc::string credentials_type; }; static std::ostream& operator<<(std::ostream& out, diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index 9cc5a8168b..c6d3600be8 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -257,6 +257,7 @@ int main(int argc, char** argv) { gpr_log(GPR_INFO, "Starting test(s).."); std::vector<std::thread> test_threads; + std::vector<std::unique_ptr<StressTestInteropClient>> clients; // Create and start the test threads. // Note that: @@ -282,9 +283,9 @@ int main(int argc, char** argv) { // Create stub(s) for each channel for (int stub_idx = 0; stub_idx < FLAGS_num_stubs_per_channel; stub_idx++) { - StressTestInteropClient* client = new StressTestInteropClient( + clients.emplace_back(new StressTestInteropClient( ++thread_idx, *it, channel, test_selector, FLAGS_test_duration_secs, - FLAGS_sleep_duration_ms, FLAGS_do_not_abort_on_transient_failures); + FLAGS_sleep_duration_ms, FLAGS_do_not_abort_on_transient_failures)); bool is_already_created = false; // QpsGauge name @@ -293,7 +294,7 @@ int main(int argc, char** argv) { server_idx, channel_idx, stub_idx); test_threads.emplace_back(std::thread( - &StressTestInteropClient::MainLoop, client, + &StressTestInteropClient::MainLoop, clients.back().get(), metrics_service.CreateQpsGauge(buffer, &is_already_created))); // The QpsGauge should not have been already created |