diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-01 11:49:00 -0700 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-01 11:49:00 -0700 |
commit | 8bd88c459a338bc217332a126c454ea84758c671 (patch) | |
tree | d590294fc800f1e6bf07f45bc4183aec269ce79a /test/cpp/end2end | |
parent | b9306327958ab7a46d5b25dd2c64da9e12778026 (diff) | |
parent | e1d91cfd585a0149666622b5a29547c85bfccbd2 (diff) |
Merge master
Diffstat (limited to 'test/cpp/end2end')
-rw-r--r-- | test/cpp/end2end/client_lb_end2end_test.cc | 7 | ||||
-rw-r--r-- | test/cpp/end2end/grpclb_end2end_test.cc | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index 60cdf08287..95630a7714 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -35,6 +35,7 @@ #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/ext/filters/client_channel/subchannel_index.h" +#include "src/core/lib/support/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" @@ -84,7 +85,11 @@ class MyTestServiceImpl : public TestServiceImpl { class ClientLbEnd2endTest : public ::testing::Test { protected: ClientLbEnd2endTest() - : server_host_("localhost"), kRequestMessage_("Live long and prosper.") {} + : server_host_("localhost"), kRequestMessage_("Live long and prosper.") { + // Make the backup poller poll very frequently in order to pick up + // updates from all the subchannels's FDs. + gpr_setenv("GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS", "1"); + } void SetUp() override { response_generator_ = grpc_fake_resolver_response_generator_create(); diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index fd84f1e8b3..499e4ef36c 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -35,6 +35,7 @@ #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/support/env.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -72,9 +73,9 @@ using std::chrono::system_clock; +using grpc::lb::v1::LoadBalancer; using grpc::lb::v1::LoadBalanceRequest; using grpc::lb::v1::LoadBalanceResponse; -using grpc::lb::v1::LoadBalancer; namespace grpc { namespace testing { @@ -330,7 +331,11 @@ class GrpclbEnd2endTest : public ::testing::Test { num_backends_(num_backends), num_balancers_(num_balancers), client_load_reporting_interval_seconds_( - client_load_reporting_interval_seconds) {} + client_load_reporting_interval_seconds) { + // Make the backup poller poll very frequently in order to pick up + // updates from all the subchannels's FDs. + gpr_setenv("GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS", "1"); + } void SetUp() override { response_generator_ = grpc_fake_resolver_response_generator_create(); |