aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/client.h
diff options
context:
space:
mode:
authorGravatar Guantao Liu <guantaol@users.noreply.github.com>2017-07-18 17:46:57 -0700
committerGravatar GitHub <noreply@github.com>2017-07-18 17:46:57 -0700
commit1932a50e5005eacc473ebea48a73828cd6b1550a (patch)
tree780cdedf302bf8639f017df9feedd6e149f3ec93 /test/cpp/qps/client.h
parent10bed24e8b6a93d9017927371e607f85619fb59b (diff)
parent29a7050c357e64639c0f1bf699489659e34778ee (diff)
Merge pull request #11787 from guantaol/qps_driver
Add a new metric and enable internal credential types in QPS Driver
Diffstat (limited to 'test/cpp/qps/client.h')
-rw-r--r--test/cpp/qps/client.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h
index ecbf9c31fa..6c4d92e859 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -39,6 +39,7 @@
#include "test/cpp/qps/interarrival.h"
#include "test/cpp/qps/usage_timer.h"
#include "test/cpp/util/create_test_channel.h"
+#include "test/cpp/util/test_credentials_provider.h"
namespace grpc {
namespace testing {
@@ -405,9 +406,18 @@ class ClientImpl : public Client {
ChannelArguments args;
args.SetInt("shard_to_ensure_no_subchannel_merges", shard);
set_channel_args(config, &args);
+
+ grpc::string type;
+ if (config.has_security_params() &&
+ config.security_params().cred_type().empty()) {
+ type = kTlsCredentialsType;
+ } else {
+ type = config.security_params().cred_type();
+ }
+
channel_ = CreateTestChannel(
- target, config.security_params().server_host_override(),
- config.has_security_params(), !config.security_params().use_test_ca(),
+ target, type, config.security_params().server_host_override(),
+ !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(