aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Hongwei Wang <hongweiw@google.com>2015-08-07 16:39:24 -0700
committerGravatar Hongwei Wang <hongweiw@google.com>2015-08-07 16:39:24 -0700
commit497d26a83d6a24836445e1e6a27cf41276f587a4 (patch)
treefc00e6a1063f3259bb3fe6caca0ebff4c30f3b07 /test
parent2ad07d7523244049b42461d4341cf3e2d5d18ab6 (diff)
Update zookeeper in jenkins docker file
Diffstat (limited to 'test')
-rw-r--r--test/cpp/end2end/zookeeper_test.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc
index 754a9470f1..24b1b25573 100644
--- a/test/cpp/end2end/zookeeper_test.cc
+++ b/test/cpp/end2end/zookeeper_test.cc
@@ -76,14 +76,14 @@ class ZookeeperTest : public ::testing::Test {
// Setup zookeeper
// Require zookeeper server running in grpc-jenkins-master
- zookeeper_address = "localhost:2181";
+ zookeeper_address_ = "localhost:2181";
char* addr = gpr_getenv("GRPC_ZOOKEEPER_SERVER_TEST");
if (addr != NULL) {
string addr_str(addr);
- zookeeper_address = addr_str;
+ zookeeper_address_ = addr_str;
gpr_free(addr);
}
- ZookeeperSetUp(zookeeper_address.c_str(), port);
+ ZookeeperSetUp(port);
// Setup server
ServerBuilder builder;
@@ -92,10 +92,10 @@ class ZookeeperTest : public ::testing::Test {
server_ = builder.BuildAndStart();
}
- void ZookeeperSetUp(const char* zookeeper_address, int port) {
+ void ZookeeperSetUp(int port) {
zoo_set_debug_level(ZOO_LOG_LEVEL_WARN);
- gpr_log(GPR_DEBUG, zookeeper_address);
- zookeeper_handle_ = zookeeper_init(zookeeper_address, NULL, 15000, 0, 0, 0);
+ gpr_log(GPR_DEBUG, zookeeper_address_.c_str());
+ zookeeper_handle_ = zookeeper_init(zookeeper_address_.c_str(), NULL, 15000, 0, 0, 0);
GPR_ASSERT(zookeeper_handle_ != NULL);
// Register service /test in zookeeper
@@ -154,7 +154,7 @@ class ZookeeperTest : public ::testing::Test {
}
void ResetStub() {
- string target = "zookeeper://" + zookeeper_address + "/test";
+ string target = "zookeeper://" + zookeeper_address_ + "/test";
channel_ = CreateChannel(target, InsecureCredentials(), ChannelArguments());
stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel_));
}
@@ -165,7 +165,7 @@ class ZookeeperTest : public ::testing::Test {
string server_address_;
ZookeeperTestServiceImpl service_;
zhandle_t* zookeeper_handle_;
- string zookeeper_address;
+ string zookeeper_address_;
};
// Test zookeeper state change between two RPCs