diff options
author | 2015-05-20 16:44:46 -0700 | |
---|---|---|
committer | 2015-05-20 16:44:46 -0700 | |
commit | 02accdb6e331a990e9a1db5c9f54efc02ee6c832 (patch) | |
tree | ced7a7b2095b9f2f967860b18da87d4d06bd993c /test | |
parent | e4b329ba14ad42c667114dc6fa79baa023aaeda5 (diff) | |
parent | 882431fff5c06eed97633353016cbcac9361a2e2 (diff) |
Merge pull request #1641 from ctiller/check-some-more-things
Run qps smoke tests on . LGTM.
Diffstat (limited to 'test')
-rw-r--r-- | test/cpp/qps/driver.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 9f7d3b56a4..6959f980ae 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)); |