aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Julien Boeuf <jboeuf@google.com>2015-08-28 14:13:04 -0700
committerGravatar Julien Boeuf <jboeuf@google.com>2015-08-28 14:13:04 -0700
commita883ccfb4620cd00d17b4c1960d8b9781f371700 (patch)
treec17370b5058fe4cfa55c54d23ce6dd011f45f115 /test
parent0c711ad88b632bea173bdea9ea24372052aa231d (diff)
parent808e5ae95f2fba44d2da925e8da0eaa5ce5c6585 (diff)
Merge branch 'master' of github.com:grpc/grpc into cpp_auth_md_processor
Diffstat (limited to 'test')
-rw-r--r--test/core/iomgr/udp_server_test.c2
-rw-r--r--test/core/util/test_config.h2
-rw-r--r--test/cpp/end2end/async_end2end_test.cc8
-rw-r--r--test/cpp/end2end/client_crash_test.cc2
-rw-r--r--test/cpp/end2end/end2end_test.cc9
-rw-r--r--test/cpp/end2end/generic_end2end_test.cc4
-rw-r--r--test/cpp/end2end/mock_test.cc4
-rw-r--r--test/cpp/end2end/server_crash_test_client.cc4
-rw-r--r--test/cpp/end2end/shutdown_test.cc2
-rw-r--r--test/cpp/end2end/thread_stress_test.cc4
-rw-r--r--test/cpp/end2end/zookeeper_test.cc2
-rw-r--r--test/cpp/qps/driver.cc8
-rw-r--r--test/cpp/qps/report.h4
-rw-r--r--test/cpp/util/cli_call_test.cc3
-rw-r--r--test/cpp/util/create_test_channel.cc4
-rw-r--r--test/cpp/util/grpc_cli.cc2
16 files changed, 31 insertions, 33 deletions
diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c
index 471d5b50c7..c91752b937 100644
--- a/test/core/iomgr/udp_server_test.c
+++ b/test/core/iomgr/udp_server_test.c
@@ -135,7 +135,7 @@ static void test_receive(int number_of_clients) {
gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset));
for (i = 0; i < number_of_clients; i++) {
- deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(4000);
+ deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10);
number_of_reads_before = g_number_of_reads;
/* Create a socket, send a packet to the UDP server. */
diff --git a/test/core/util/test_config.h b/test/core/util/test_config.h
index b2cc40bb47..ccef8620c1 100644
--- a/test/core/util/test_config.h
+++ b/test/core/util/test_config.h
@@ -56,7 +56,7 @@ extern double g_fixture_slowdown_factor;
#define GRPC_TIMEOUT_SECONDS_TO_DEADLINE(x) \
gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), \
- gpr_time_from_micros(GRPC_TEST_SLOWDOWN_FACTOR * 1e6 * (x), \
+ gpr_time_from_millis(GRPC_TEST_SLOWDOWN_FACTOR * 1e3 * (x), \
GPR_TIMESPAN))
#define GRPC_TIMEOUT_MILLIS_TO_DEADLINE(x) \
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc
index 41b91e459b..bbcac9ba34 100644
--- a/test/cpp/end2end/async_end2end_test.cc
+++ b/test/cpp/end2end/async_end2end_test.cc
@@ -200,8 +200,8 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<bool> {
}
void ResetStub() {
- std::shared_ptr<Channel> channel = CreateChannel(
- server_address_.str(), InsecureCredentials(), ChannelArguments());
+ std::shared_ptr<Channel> channel =
+ CreateChannel(server_address_.str(), InsecureCredentials());
stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel));
}
@@ -750,8 +750,8 @@ TEST_P(AsyncEnd2endTest, ServerCheckDone) {
}
TEST_P(AsyncEnd2endTest, UnimplementedRpc) {
- std::shared_ptr<Channel> channel = CreateChannel(
- server_address_.str(), InsecureCredentials(), ChannelArguments());
+ std::shared_ptr<Channel> channel =
+ CreateChannel(server_address_.str(), InsecureCredentials());
std::unique_ptr<grpc::cpp::test::util::UnimplementedService::Stub> stub;
stub =
std::move(grpc::cpp::test::util::UnimplementedService::NewStub(channel));
diff --git a/test/cpp/end2end/client_crash_test.cc b/test/cpp/end2end/client_crash_test.cc
index 3359080cec..3a6e55216a 100644
--- a/test/cpp/end2end/client_crash_test.cc
+++ b/test/cpp/end2end/client_crash_test.cc
@@ -76,7 +76,7 @@ class CrashTest : public ::testing::Test {
}));
GPR_ASSERT(server_);
return grpc::cpp::test::util::TestService::NewStub(
- CreateChannel(addr, InsecureCredentials(), ChannelArguments()));
+ CreateChannel(addr, InsecureCredentials()));
}
void KillServer() { server_.reset(); }
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc
index 72188e4da5..93486a7c67 100644
--- a/test/cpp/end2end/end2end_test.cc
+++ b/test/cpp/end2end/end2end_test.cc
@@ -361,8 +361,8 @@ class End2endTest : public ::testing::TestWithParam<bool> {
ChannelArguments args;
args.SetSslTargetNameOverride("foo.test.google.fr");
args.SetString(GRPC_ARG_SECONDARY_USER_AGENT_STRING, "end2end_test");
- channel_ =
- CreateChannel(server_address_.str(), SslCredentials(ssl_opts), args);
+ channel_ = CreateCustomChannel(server_address_.str(),
+ SslCredentials(ssl_opts), args);
}
void ResetStub(bool use_proxy) {
@@ -377,8 +377,7 @@ class End2endTest : public ::testing::TestWithParam<bool> {
builder.RegisterService(proxy_service_.get());
proxy_server_ = builder.BuildAndStart();
- channel_ = CreateChannel(proxyaddr.str(), InsecureCredentials(),
- ChannelArguments());
+ channel_ = CreateChannel(proxyaddr.str(), InsecureCredentials());
}
stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel_));
@@ -637,7 +636,7 @@ TEST_F(End2endTest, BadCredentials) {
std::shared_ptr<Credentials> bad_creds = ServiceAccountCredentials("", "", 1);
EXPECT_EQ(static_cast<Credentials*>(nullptr), bad_creds.get());
std::shared_ptr<Channel> channel =
- CreateChannel(server_address_.str(), bad_creds, ChannelArguments());
+ CreateChannel(server_address_.str(), bad_creds);
std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub(
grpc::cpp::test::util::TestService::NewStub(channel));
EchoRequest request;
diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc
index 809eef058c..7acbc711fb 100644
--- a/test/cpp/end2end/generic_end2end_test.cc
+++ b/test/cpp/end2end/generic_end2end_test.cc
@@ -121,8 +121,8 @@ class GenericEnd2endTest : public ::testing::Test {
}
void ResetStub() {
- std::shared_ptr<Channel> channel = CreateChannel(
- server_address_.str(), InsecureCredentials(), ChannelArguments());
+ std::shared_ptr<Channel> channel =
+ CreateChannel(server_address_.str(), InsecureCredentials());
generic_stub_.reset(new GenericStub(channel));
}
diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc
index b2c6dc39a8..077d21aa72 100644
--- a/test/cpp/end2end/mock_test.cc
+++ b/test/cpp/end2end/mock_test.cc
@@ -245,8 +245,8 @@ class MockTest : public ::testing::Test {
void TearDown() GRPC_OVERRIDE { server_->Shutdown(); }
void ResetStub() {
- std::shared_ptr<Channel> channel = CreateChannel(
- server_address_.str(), InsecureCredentials(), ChannelArguments());
+ std::shared_ptr<Channel> channel =
+ CreateChannel(server_address_.str(), InsecureCredentials());
stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel));
}
diff --git a/test/cpp/end2end/server_crash_test_client.cc b/test/cpp/end2end/server_crash_test_client.cc
index 7ca43a0c5b..6ff42fcb30 100644
--- a/test/cpp/end2end/server_crash_test_client.cc
+++ b/test/cpp/end2end/server_crash_test_client.cc
@@ -58,8 +58,8 @@ using namespace gflags;
int main(int argc, char** argv) {
ParseCommandLineFlags(&argc, &argv, true);
- auto stub = grpc::cpp::test::util::TestService::NewStub(grpc::CreateChannel(
- FLAGS_address, grpc::InsecureCredentials(), grpc::ChannelArguments()));
+ auto stub = grpc::cpp::test::util::TestService::NewStub(
+ grpc::CreateChannel(FLAGS_address, grpc::InsecureCredentials()));
EchoRequest request;
EchoResponse response;
diff --git a/test/cpp/end2end/shutdown_test.cc b/test/cpp/end2end/shutdown_test.cc
index e83f86f7ec..59fec6ad40 100644
--- a/test/cpp/end2end/shutdown_test.cc
+++ b/test/cpp/end2end/shutdown_test.cc
@@ -95,7 +95,7 @@ class ShutdownTest : public ::testing::Test {
void ResetStub() {
string target = "dns:localhost:" + to_string(port_);
- channel_ = CreateChannel(target, InsecureCredentials(), ChannelArguments());
+ channel_ = CreateChannel(target, InsecureCredentials());
stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel_));
}
diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc
index 8304f04d56..2a16481972 100644
--- a/test/cpp/end2end/thread_stress_test.cc
+++ b/test/cpp/end2end/thread_stress_test.cc
@@ -191,8 +191,8 @@ class End2endTest : public ::testing::Test {
void TearDown() GRPC_OVERRIDE { server_->Shutdown(); }
void ResetStub() {
- std::shared_ptr<Channel> channel = CreateChannel(
- server_address_.str(), InsecureCredentials(), ChannelArguments());
+ std::shared_ptr<Channel> channel =
+ CreateChannel(server_address_.str(), InsecureCredentials());
stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel));
}
diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc
index e7d95b1c46..931541ca34 100644
--- a/test/cpp/end2end/zookeeper_test.cc
+++ b/test/cpp/end2end/zookeeper_test.cc
@@ -159,7 +159,7 @@ class ZookeeperTest : public ::testing::Test {
void ResetStub() {
string target = "zookeeper://" + zookeeper_address_ + "/test";
- channel_ = CreateChannel(target, InsecureCredentials(), ChannelArguments());
+ channel_ = CreateChannel(target, InsecureCredentials());
stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel_));
}
diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc
index 3bd61ea4e8..0e771d6b81 100644
--- a/test/cpp/qps/driver.cc
+++ b/test/cpp/qps/driver.cc
@@ -154,8 +154,8 @@ std::unique_ptr<ScenarioResult> RunScenario(
// where class contained in std::vector must have a copy constructor
auto* servers = new ServerData[num_servers];
for (size_t i = 0; i < num_servers; i++) {
- servers[i].stub = std::move(Worker::NewStub(
- CreateChannel(workers[i], InsecureCredentials(), ChannelArguments())));
+ servers[i].stub = std::move(
+ Worker::NewStub(CreateChannel(workers[i], InsecureCredentials())));
ServerArgs args;
result_server_config = server_config;
result_server_config.set_host(workers[i]);
@@ -182,8 +182,8 @@ std::unique_ptr<ScenarioResult> RunScenario(
// where class contained in std::vector must have a copy constructor
auto* clients = new ClientData[num_clients];
for (size_t i = 0; i < num_clients; i++) {
- clients[i].stub = std::move(Worker::NewStub(CreateChannel(
- workers[i + num_servers], InsecureCredentials(), ChannelArguments())));
+ clients[i].stub = std::move(Worker::NewStub(
+ CreateChannel(workers[i + num_servers], InsecureCredentials())));
ClientArgs args;
result_client_config = client_config;
result_client_config.set_host(workers[i + num_servers]);
diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h
index 620abade39..5914fc4e30 100644
--- a/test/cpp/qps/report.h
+++ b/test/cpp/qps/report.h
@@ -116,8 +116,8 @@ class PerfDbReporter : public Reporter {
test_name_(test_name),
sys_info_(sys_info),
tag_(tag) {
- perf_db_client_.init(grpc::CreateChannel(
- server_address, grpc::InsecureCredentials(), ChannelArguments()));
+ perf_db_client_.init(
+ grpc::CreateChannel(server_address, grpc::InsecureCredentials()));
}
~PerfDbReporter() GRPC_OVERRIDE { SendData(); };
diff --git a/test/cpp/util/cli_call_test.cc b/test/cpp/util/cli_call_test.cc
index 111a0e9f76..0efa201622 100644
--- a/test/cpp/util/cli_call_test.cc
+++ b/test/cpp/util/cli_call_test.cc
@@ -91,8 +91,7 @@ class CliCallTest : public ::testing::Test {
void TearDown() GRPC_OVERRIDE { server_->Shutdown(); }
void ResetStub() {
- channel_ = CreateChannel(server_address_.str(), InsecureCredentials(),
- ChannelArguments());
+ channel_ = CreateChannel(server_address_.str(), InsecureCredentials());
stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel_));
}
diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc
index 161b4bdc1d..e993d14e71 100644
--- a/test/cpp/util/create_test_channel.cc
+++ b/test/cpp/util/create_test_channel.cc
@@ -74,9 +74,9 @@ std::shared_ptr<Channel> CreateTestChannel(
if (creds.get()) {
channel_creds = CompositeCredentials(creds, channel_creds);
}
- return CreateChannel(connect_to, channel_creds, channel_args);
+ return CreateCustomChannel(connect_to, channel_creds, channel_args);
} else {
- return CreateChannel(server, InsecureCredentials(), channel_args);
+ return CreateChannel(server, InsecureCredentials());
}
}
diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc
index a4888efebe..22cac21f77 100644
--- a/test/cpp/util/grpc_cli.cc
+++ b/test/cpp/util/grpc_cli.cc
@@ -159,7 +159,7 @@ int main(int argc, char** argv) {
}
}
std::shared_ptr<grpc::Channel> channel =
- grpc::CreateChannel(server_address, creds, grpc::ChannelArguments());
+ grpc::CreateChannel(server_address, creds);
grpc::string response;
std::multimap<grpc::string, grpc::string> client_metadata;