From 5112d75a46effd4a89d955d81559877363f3e8b7 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Thu, 30 Jul 2020 23:43:02 -0700 Subject: [PATCH] Add TestEnvironment to tests --- test/cpp/qps/inproc_sync_unary_ping_pong_test.cc | 2 ++ test/cpp/qps/qps_interarrival_test.cc | 2 ++ test/cpp/qps/qps_openloop_test.cc | 1 + 3 files changed, 5 insertions(+) diff --git a/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc b/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc index 6257e42ebf4..1e2caa2be6f 100644 --- a/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc @@ -20,6 +20,7 @@ #include +#include "test/core/util/test_config.h" #include "test/cpp/qps/benchmark_config.h" #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" @@ -58,6 +59,7 @@ static void RunSynchronousUnaryPingPong() { } // namespace grpc int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); grpc::testing::InitTest(&argc, &argv, true); grpc::testing::RunSynchronousUnaryPingPong(); diff --git a/test/cpp/qps/qps_interarrival_test.cc b/test/cpp/qps/qps_interarrival_test.cc index 2cc22e9985f..1f29cd72968 100644 --- a/test/cpp/qps/qps_interarrival_test.cc +++ b/test/cpp/qps/qps_interarrival_test.cc @@ -22,6 +22,7 @@ // Use the C histogram rather than C++ to avoid depending on proto #include "test/core/util/histogram.h" +#include "test/core/util/test_config.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/util/test_config.h" @@ -52,6 +53,7 @@ static void RunTest(RandomDistInterface&& r, int threads, using grpc::testing::ExpDist; int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); grpc::testing::InitTest(&argc, &argv, true); RunTest(ExpDist(10.0), 5, std::string("Exponential(10)")); diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index 68062e66f25..19ff02b71f3 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -62,6 +62,7 @@ static void RunQPS() { } // namespace grpc int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); grpc::testing::InitTest(&argc, &argv, true); grpc::testing::RunQPS();