aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-05-19 13:20:00 -0700
committerGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-05-19 13:20:00 -0700
commit1226387698e70ef3247fe35f1c5b964d6598ba97 (patch)
tree0e49723bf60b4d4d175e8e3058cd69377f32e1dd /test
parent505b13df845beaa97a81fa4d1d892a105521f433 (diff)
parent52237e3a961e3b4a025399ec7a0abe57a16331d6 (diff)
Merge pull request #6585 from ctiller/connect_first
Make qps workers connect before even warmup stage begins
Diffstat (limited to 'test')
-rw-r--r--test/cpp/qps/client.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h
index 175529f01b..2a89eb8018 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -38,6 +38,7 @@
#include <mutex>
#include <vector>
+#include <grpc++/channel.h>
#include <grpc++/support/byte_buffer.h>
#include <grpc++/support/channel_arguments.h>
#include <grpc++/support/slice.h>
@@ -315,6 +316,10 @@ class ClientImpl : public Client {
target, config.security_params().server_host_override(),
config.has_security_params(), !config.security_params().use_test_ca(),
std::shared_ptr<CallCredentials>(), args);
+ gpr_log(GPR_INFO, "Connecting to %s", target.c_str());
+ GPR_ASSERT(channel_->WaitForConnected(
+ gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
+ gpr_time_from_seconds(30, GPR_TIMESPAN))));
stub_ = create_stub(channel_);
}
Channel* get_channel() { return channel_.get(); }