diff options
author | 2016-12-06 20:27:38 -0800 | |
---|---|---|
committer | 2016-12-06 20:27:38 -0800 | |
commit | 385dd9a46294c5230dc22ce587050b30adc5f90f (patch) | |
tree | acd6a645bacbf4089f83a5b07b0c3a2821830317 /test/cpp | |
parent | ddea41e666e2c23a3f1a38e0452e541baa6dddd3 (diff) | |
parent | 35769dc29c5fd55ccaf8a234d8704fe7dd7c7fdb (diff) |
Merge branch 'slice_interning' into metadata_filter
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/common/channel_arguments_test.cc | 10 | ||||
-rw-r--r-- | test/cpp/end2end/server_crash_test.cc | 4 | ||||
-rw-r--r-- | test/cpp/interop/interop_server.cc | 2 | ||||
-rw-r--r-- | test/cpp/interop/interop_server_bootstrap.cc | 4 | ||||
-rw-r--r-- | test/cpp/interop/interop_test.cc | 2 | ||||
-rw-r--r-- | test/cpp/interop/server_helper.h | 6 | ||||
-rwxr-xr-x | test/cpp/qps/gen_build_yaml.py | 6 |
7 files changed, 22 insertions, 12 deletions
diff --git a/test/cpp/common/channel_arguments_test.cc b/test/cpp/common/channel_arguments_test.cc index 0cbe6f9636..190d32ce06 100644 --- a/test/cpp/common/channel_arguments_test.cc +++ b/test/cpp/common/channel_arguments_test.cc @@ -37,7 +37,11 @@ #include <grpc/grpc.h> #include <grpc/support/useful.h> #include <gtest/gtest.h> + +extern "C" { +#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/socket_mutator.h" +} namespace grpc { namespace testing { @@ -228,7 +232,11 @@ TEST_F(ChannelArgumentsTest, SetSocketMutator) { EXPECT_FALSE(HasArg(arg0)); // arg0 is destroyed by grpc_socket_mutator_to_arg(mutator1) - arg1.value.pointer.vtable->destroy(nullptr, arg1.value.pointer.p); + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + arg1.value.pointer.vtable->destroy(&exec_ctx, arg1.value.pointer.p); + grpc_exec_ctx_finish(&exec_ctx); + } } TEST_F(ChannelArgumentsTest, SetUserAgentPrefix) { diff --git a/test/cpp/end2end/server_crash_test.cc b/test/cpp/end2end/server_crash_test.cc index 8cee1403dc..b1f9216055 100644 --- a/test/cpp/end2end/server_crash_test.cc +++ b/test/cpp/end2end/server_crash_test.cc @@ -138,7 +138,7 @@ TEST_F(CrashTest, ResponseStream) { auto server = CreateServerAndClient("response"); gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_seconds(5, GPR_TIMESPAN))); + gpr_time_from_seconds(60, GPR_TIMESPAN))); KillClient(); server->Shutdown(); GPR_ASSERT(HadOneResponseStream()); @@ -148,7 +148,7 @@ TEST_F(CrashTest, BidiStream) { auto server = CreateServerAndClient("bidi"); gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_seconds(5, GPR_TIMESPAN))); + gpr_time_from_seconds(60, GPR_TIMESPAN))); KillClient(); server->Shutdown(); GPR_ASSERT(HadOneBidiStream()); diff --git a/test/cpp/interop/interop_server.cc b/test/cpp/interop/interop_server.cc index 8b50ae8c05..67456ce18b 100644 --- a/test/cpp/interop/interop_server.cc +++ b/test/cpp/interop/interop_server.cc @@ -344,7 +344,7 @@ void grpc::testing::interop::RunServer( } std::unique_ptr<Server> server(builder.BuildAndStart()); gpr_log(GPR_INFO, "Server listening on %s", server_address.str().c_str()); - while (!g_got_sigint) { + while (!gpr_atm_no_barrier_load(&g_got_sigint)) { sleep(5); } } diff --git a/test/cpp/interop/interop_server_bootstrap.cc b/test/cpp/interop/interop_server_bootstrap.cc index 424f7ca7f0..99518c6943 100644 --- a/test/cpp/interop/interop_server_bootstrap.cc +++ b/test/cpp/interop/interop_server_bootstrap.cc @@ -37,10 +37,10 @@ #include "test/cpp/interop/server_helper.h" #include "test/cpp/util/test_config.h" -bool grpc::testing::interop::g_got_sigint = false; +gpr_atm grpc::testing::interop::g_got_sigint; static void sigint_handler(int x) { - grpc::testing::interop::g_got_sigint = true; + gpr_atm_no_barrier_store(&grpc::testing::interop::g_got_sigint, true); } int main(int argc, char** argv) { diff --git a/test/cpp/interop/interop_test.cc b/test/cpp/interop/interop_test.cc index c066598d36..d4004740a4 100644 --- a/test/cpp/interop/interop_test.cc +++ b/test/cpp/interop/interop_test.cc @@ -126,7 +126,7 @@ int main(int argc, char** argv) { return 1; } /* wait a little */ - sleep(2); + sleep(10); /* start the clients */ ret = test_client(root, "127.0.0.1", port); if (ret != 0) return ret; diff --git a/test/cpp/interop/server_helper.h b/test/cpp/interop/server_helper.h index fc4ea8b3e8..99539adee5 100644 --- a/test/cpp/interop/server_helper.h +++ b/test/cpp/interop/server_helper.h @@ -36,9 +36,11 @@ #include <memory> +#include <grpc/compression.h> +#include <grpc/impl/codegen/atm.h> + #include <grpc++/security/server_credentials.h> #include <grpc++/server_context.h> -#include <grpc/compression.h> namespace grpc { namespace testing { @@ -62,7 +64,7 @@ class InteropServerContextInspector { namespace interop { -extern bool g_got_sigint; +extern gpr_atm g_got_sigint; void RunServer(std::shared_ptr<ServerCredentials> creds); } // namespace interop diff --git a/test/cpp/qps/gen_build_yaml.py b/test/cpp/qps/gen_build_yaml.py index 4aa58d2737..188d6196e5 100755 --- a/test/cpp/qps/gen_build_yaml.py +++ b/test/cpp/qps/gen_build_yaml.py @@ -91,7 +91,7 @@ print yaml.dump({ 'boringssl': True, 'defaults': 'boringssl', 'cpu_cost': guess_cpu(scenario_json, False), - 'exclude_configs': ['tsan'], + 'exclude_configs': ['tsan', 'asan'], 'timeout_seconds': 6*60 } for scenario_json in scenario_config.CXXLanguage().scenarios() @@ -99,7 +99,7 @@ print yaml.dump({ ] + [ { 'name': 'json_run_localhost', - 'shortname': 'json_run_localhost:%s' % scenario_json['name'], + 'shortname': 'json_run_localhost:%s_low_thread_count' % scenario_json['name'], 'args': ['--scenarios_json', _scenario_json_string(scenario_json, True)], 'ci_platforms': ['linux'], 'platforms': ['linux'], @@ -108,7 +108,7 @@ print yaml.dump({ 'boringssl': True, 'defaults': 'boringssl', 'cpu_cost': guess_cpu(scenario_json, True), - 'exclude_configs': sorted(c for c in configs_from_yaml if c != 'tsan'), + 'exclude_configs': sorted(c for c in configs_from_yaml if c not in ('tsan', 'asan')), 'timeout_seconds': 6*60 } for scenario_json in scenario_config.CXXLanguage().scenarios() |