aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-01 11:49:00 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-01 11:49:00 -0700
commit8bd88c459a338bc217332a126c454ea84758c671 (patch)
treed590294fc800f1e6bf07f45bc4183aec269ce79a
parentb9306327958ab7a46d5b25dd2c64da9e12778026 (diff)
parente1d91cfd585a0149666622b5a29547c85bfccbd2 (diff)
Merge master
-rw-r--r--build.yaml14
-rw-r--r--grpc.gemspec2
-rw-r--r--src/core/lib/iomgr/ev_epollex_linux.cc3
-rw-r--r--templates/grpc.gemspec.template2
-rw-r--r--test/cpp/end2end/client_lb_end2end_test.cc7
-rw-r--r--test/cpp/end2end/grpclb_end2end_test.cc9
-rw-r--r--test/cpp/grpclb/grpclb_test.cc4
-rw-r--r--tools/internal_ci/helper_scripts/prepare_build_macos_interop_rc1
-rw-r--r--tools/run_tests/generated/tests.json19
-rwxr-xr-xtools/run_tests/run_tests.py35
10 files changed, 48 insertions, 48 deletions
diff --git a/build.yaml b/build.yaml
index 6031d1ef56..c3cd71ace1 100644
--- a/build.yaml
+++ b/build.yaml
@@ -3716,6 +3716,8 @@ targets:
- --benchmark_min_time=0
benchmark: true
defaults: benchmark
+ exclude_configs:
+ - tsan
excluded_poll_engines:
- poll
- poll-cv
@@ -3877,10 +3879,6 @@ targets:
- grpc
- gpr_test_util
- gpr
- excluded_poll_engines:
- - poll
- - poll-cv
- - epollex
- name: codegen_test_full
gtest: true
build: test
@@ -4169,9 +4167,6 @@ targets:
- grpc
- gpr_test_util
- gpr
- excluded_poll_engines:
- - poll
- - poll-cv
- name: grpclb_test
gtest: false
build: test
@@ -4186,10 +4181,6 @@ targets:
- grpc
- gpr_test_util
- gpr
- excluded_poll_engines:
- - poll
- - poll-cv
- - epollex
- name: h2_ssl_cert_test
gtest: true
build: test
@@ -4760,7 +4751,6 @@ targets:
- grpc_unsecure
- gpr_test_util
- gpr
- timeout_seconds: 1200
- name: transport_pid_controller_test
build: test
language: c++
diff --git a/grpc.gemspec b/grpc.gemspec
index 8f4c00bd4f..2fe2536cc7 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.add_dependency 'google-protobuf', '~> 3.1'
- s.add_dependency 'googleauth', '~> 0.5.1'
+ s.add_dependency 'googleauth', '>= 0.5.1', '< 0.7'
s.add_dependency 'googleapis-common-protos-types', '~> 1.0.0'
s.add_development_dependency 'bundler', '~> 1.9'
diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
index fa6d79cbfc..0809d574a9 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.cc
+++ b/src/core/lib/iomgr/ev_epollex_linux.cc
@@ -577,7 +577,6 @@ static grpc_error *kick_one_worker(grpc_exec_ctx *exec_ctx,
grpc_pollset_worker *specific_worker) {
pollable *p = specific_worker->pollable_obj;
grpc_core::mu_guard lock(&p->mu);
- GRPC_STATS_INC_POLLSET_KICK(exec_ctx);
GPR_ASSERT(specific_worker != NULL);
if (specific_worker->kicked) {
if (GRPC_TRACER_ON(grpc_polling_trace)) {
@@ -619,6 +618,7 @@ static grpc_error *kick_one_worker(grpc_exec_ctx *exec_ctx,
static grpc_error *pollset_kick(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker *specific_worker) {
+ GRPC_STATS_INC_POLLSET_KICK(exec_ctx);
if (GRPC_TRACER_ON(grpc_polling_trace)) {
gpr_log(GPR_DEBUG,
"PS:%p kick %p tls_pollset=%p tls_worker=%p pollset.root_worker=%p",
@@ -674,6 +674,7 @@ static grpc_error *pollset_kick_all(grpc_exec_ctx *exec_ctx,
grpc_pollset_worker *w = pollset->root_worker;
if (w != NULL) {
do {
+ GRPC_STATS_INC_POLLSET_KICK(exec_ctx);
append_error(&error, kick_one_worker(exec_ctx, w), err_desc);
w = w->links[PWLINK_POLLSET].next;
} while (w != pollset->root_worker);
diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template
index 215d5f9df9..fb54de1c8e 100644
--- a/templates/grpc.gemspec.template
+++ b/templates/grpc.gemspec.template
@@ -30,7 +30,7 @@
s.platform = Gem::Platform::RUBY
s.add_dependency 'google-protobuf', '~> 3.1'
- s.add_dependency 'googleauth', '~> 0.5.1'
+ s.add_dependency 'googleauth', '>= 0.5.1', '< 0.7'
s.add_dependency 'googleapis-common-protos-types', '~> 1.0.0'
s.add_development_dependency 'bundler', '~> 1.9'
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();
diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc
index 0fadc256ec..a4b364417d 100644
--- a/test/cpp/grpclb/grpclb_test.cc
+++ b/test/cpp/grpclb/grpclb_test.cc
@@ -42,6 +42,7 @@
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/security/credentials/fake/fake_credentials.h"
+#include "src/core/lib/support/env.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/support/tmpfile.h"
#include "src/core/lib/surface/channel.h"
@@ -789,6 +790,9 @@ TEST(GrpclbTest, InvalidAddressInServerlist) {}
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
grpc_test_init(argc, argv);
+ // 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");
grpc_init();
const auto result = RUN_ALL_TESTS();
grpc_shutdown();
diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_interop_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_interop_rc
index bb046defb1..6ecf51dd3f 100644
--- a/tools/internal_ci/helper_scripts/prepare_build_macos_interop_rc
+++ b/tools/internal_ci/helper_scripts/prepare_build_macos_interop_rc
@@ -25,6 +25,7 @@ cp -R ./ /Users/kbuilder/workspace/grpc
cd /Users/kbuilder/workspace/grpc
# Needed for identifying Docker image sha1
+brew update
brew install md5sha1sum
# Set up gRPC-Go and gRPC-Java to test
diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json
index 11c08278d1..5ba06bf1a0 100644
--- a/tools/run_tests/generated/tests.json
+++ b/tools/run_tests/generated/tests.json
@@ -3224,7 +3224,9 @@
"posix"
],
"cpu_cost": 1.0,
- "exclude_configs": [],
+ "exclude_configs": [
+ "tsan"
+ ],
"exclude_iomgrs": [],
"excluded_poll_engines": [
"poll",
@@ -3425,11 +3427,6 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
- "excluded_poll_engines": [
- "poll",
- "poll-cv",
- "epollex"
- ],
"flaky": false,
"gtest": true,
"language": "c++",
@@ -3792,10 +3789,6 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
- "excluded_poll_engines": [
- "poll",
- "poll-cv"
- ],
"flaky": false,
"gtest": true,
"language": "c++",
@@ -3820,11 +3813,6 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
- "excluded_poll_engines": [
- "poll",
- "poll-cv",
- "epollex"
- ],
"flaky": false,
"gtest": false,
"language": "c++",
@@ -4402,7 +4390,6 @@
"posix",
"windows"
],
- "timeout_seconds": 1200,
"uses_polling": true
},
{
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index c3d070af11..209925b5e6 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -296,23 +296,30 @@ class CLanguage(object):
if resolver:
env['GRPC_DNS_RESOLVER'] = resolver
shortname_ext = '' if polling_strategy=='all' else ' GRPC_POLL_STRATEGY=%s' % polling_strategy
- timeout_scaling = 1
-
- if auto_timeout_scaling and polling_strategy == 'poll-cv':
- timeout_scaling *= 5
-
if polling_strategy in target.get('excluded_poll_engines', []):
continue
- # Scale overall test timeout if running under various sanitizers.
- config = self.args.config
- if auto_timeout_scaling and ('asan' in config
- or config == 'msan'
- or config == 'tsan'
- or config == 'ubsan'
- or config == 'helgrind'
- or config == 'memcheck'):
- timeout_scaling *= 20
+ timeout_scaling = 1
+ if auto_timeout_scaling:
+ config = self.args.config
+ if ('asan' in config
+ or config == 'msan'
+ or config == 'tsan'
+ or config == 'ubsan'
+ or config == 'helgrind'
+ or config == 'memcheck'):
+ # Scale overall test timeout if running under various sanitizers.
+ # scaling value is based on historical data analysis
+ timeout_scaling *= 3
+ elif polling_strategy == 'poll-cv':
+ # scale test timeout if running with poll-cv
+ # sanitizer and poll-cv scaling is not cumulative to ensure
+ # reasonable timeout values.
+ # TODO(jtattermusch): based on historical data and 5min default
+ # test timeout poll-cv scaling is currently not useful.
+ # Leaving here so it can be reintroduced if the default test timeout
+ # is decreased in the future.
+ timeout_scaling *= 1
if self.config.build_config in target['exclude_configs']:
continue