diff --git a/Makefile b/Makefile index d163a1286aa..9742e691af3 100644 --- a/Makefile +++ b/Makefile @@ -2049,6 +2049,10 @@ test_c: buildtests_c test_cxx: buildtests_cxx $(E) "[RUN] Testing async_end2end_test" $(Q) $(BINDIR)/$(CONFIG)/async_end2end_test || ( echo test async_end2end_test failed ; exit 1 ) + $(E) "[RUN] Testing async_streaming_ping_pong_test" + $(Q) $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test || ( echo test async_streaming_ping_pong_test failed ; exit 1 ) + $(E) "[RUN] Testing async_unary_ping_pong_test" + $(Q) $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test || ( echo test async_unary_ping_pong_test failed ; exit 1 ) $(E) "[RUN] Testing channel_arguments_test" $(Q) $(BINDIR)/$(CONFIG)/channel_arguments_test || ( echo test channel_arguments_test failed ; exit 1 ) $(E) "[RUN] Testing cli_call_test" @@ -2067,6 +2071,10 @@ test_cxx: buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/mock_test || ( echo test mock_test failed ; exit 1 ) $(E) "[RUN] Testing status_test" $(Q) $(BINDIR)/$(CONFIG)/status_test || ( echo test status_test failed ; exit 1 ) + $(E) "[RUN] Testing sync_streaming_ping_pong_test" + $(Q) $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test || ( echo test sync_streaming_ping_pong_test failed ; exit 1 ) + $(E) "[RUN] Testing sync_unary_ping_pong_test" + $(Q) $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test || ( echo test sync_unary_ping_pong_test failed ; exit 1 ) $(E) "[RUN] Testing thread_pool_test" $(Q) $(BINDIR)/$(CONFIG)/thread_pool_test || ( echo test thread_pool_test failed ; exit 1 ) $(E) "[RUN] Testing thread_stress_test" diff --git a/build.json b/build.json index 18c0eb1211d..8a7e65b99ab 100644 --- a/build.json +++ b/build.json @@ -1813,7 +1813,6 @@ { "name": "async_streaming_ping_pong_test", "build": "test", - "run": false, "language": "c++", "src": [ "test/cpp/qps/async_streaming_ping_pong_test.cc" @@ -1831,7 +1830,6 @@ { "name": "async_unary_ping_pong_test", "build": "test", - "run": false, "language": "c++", "src": [ "test/cpp/qps/async_unary_ping_pong_test.cc" @@ -2207,7 +2205,6 @@ { "name": "sync_streaming_ping_pong_test", "build": "test", - "run": false, "language": "c++", "src": [ "test/cpp/qps/sync_streaming_ping_pong_test.cc" @@ -2225,7 +2222,6 @@ { "name": "sync_unary_ping_pong_test", "build": "test", - "run": false, "language": "c++", "src": [ "test/cpp/qps/sync_unary_ping_pong_test.cc" diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 9f7d3b56a44..6959f980ae2 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -44,9 +44,11 @@ #include <thread> #include <deque> #include <vector> +#include <unistd.h> #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/qps_worker.h" #include "test/core/util/port.h" +#include "test/core/util/test_config.h" using std::list; using std::thread; @@ -96,6 +98,16 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config, // Spawn some local workers if desired vector<unique_ptr<QpsWorker>> local_workers; for (int i = 0; i < abs(spawn_local_worker_count); i++) { + // act as if we're a new test -- gets a good rng seed + static bool called_init = false; + if (!called_init) { + char args_buf[100]; + strcpy(args_buf, "some-benchmark"); + char *args[] = {args_buf}; + grpc_test_init(1, args); + called_init = true; + } + int driver_port = grpc_pick_unused_port_or_die(); int benchmark_port = grpc_pick_unused_port_or_die(); local_workers.emplace_back(new QpsWorker(driver_port, benchmark_port)); diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 30ddb2bee23..8ea3b934d17 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -596,6 +596,24 @@ "posix" ] }, + { + "flaky": false, + "language": "c++", + "name": "async_streaming_ping_pong_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c++", + "name": "async_unary_ping_pong_test", + "platforms": [ + "windows", + "posix" + ] + }, { "flaky": false, "language": "c++", @@ -677,6 +695,24 @@ "posix" ] }, + { + "flaky": false, + "language": "c++", + "name": "sync_streaming_ping_pong_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c++", + "name": "sync_unary_ping_pong_test", + "platforms": [ + "windows", + "posix" + ] + }, { "flaky": false, "language": "c++",