diff options
author | Sree Kuchibhotla <sreek@google.com> | 2017-11-08 10:21:59 -0800 |
---|---|---|
committer | Sree Kuchibhotla <sreek@google.com> | 2017-11-08 10:21:59 -0800 |
commit | 52f7039dc4319804a902cc35df4d0cd08ba50421 (patch) | |
tree | cbd9c05c471ac7685aed1b4e095d620ed7e546f2 /test/cpp | |
parent | 9a0db888855e0905946ab476892ba697a6a9200d (diff) | |
parent | 99dcb6953e3a01e2a2795ba3f09e6b6f64114d95 (diff) |
Merge branch 'master' into cc-tsan-1
Diffstat (limited to 'test/cpp')
22 files changed, 8 insertions, 45 deletions
diff --git a/test/cpp/common/auth_property_iterator_test.cc b/test/cpp/common/auth_property_iterator_test.cc index e25d2a7597..4a097e8739 100644 --- a/test/cpp/common/auth_property_iterator_test.cc +++ b/test/cpp/common/auth_property_iterator_test.cc @@ -22,9 +22,7 @@ #include "src/cpp/common/secure_auth_context.h" #include "test/cpp/util/string_ref_helper.h" -extern "C" { #include "src/core/lib/security/context/security_context.h" -} using ::grpc::testing::ToString; diff --git a/test/cpp/common/channel_arguments_test.cc b/test/cpp/common/channel_arguments_test.cc index 748ce27800..d6ed2e5aa2 100644 --- a/test/cpp/common/channel_arguments_test.cc +++ b/test/cpp/common/channel_arguments_test.cc @@ -23,10 +23,8 @@ #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 { diff --git a/test/cpp/common/secure_auth_context_test.cc b/test/cpp/common/secure_auth_context_test.cc index 91c7a3b5df..0cc32c1853 100644 --- a/test/cpp/common/secure_auth_context_test.cc +++ b/test/cpp/common/secure_auth_context_test.cc @@ -22,9 +22,7 @@ #include <gtest/gtest.h> #include "test/cpp/util/string_ref_helper.h" -extern "C" { #include "src/core/lib/security/context/security_context.h" -} using grpc::testing::ToString; diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index fc87badc31..95630a7714 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -33,11 +33,9 @@ #include <grpc/support/thd.h> #include <grpc/support/time.h> -extern "C" { #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" diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc index 7f7ed14802..40949e8f3a 100644 --- a/test/cpp/end2end/generic_end2end_test.cc +++ b/test/cpp/end2end/generic_end2end_test.cc @@ -216,9 +216,10 @@ TEST_F(GenericEnd2endTest, SequentialUnaryRpcs) { std::unique_ptr<ByteBuffer> cli_send_buffer = SerializeToByteBuffer(&send_request); + // Use the same cq as server so that events can be polled in time. std::unique_ptr<GenericClientAsyncResponseReader> call = generic_stub_->PrepareUnaryCall(&cli_ctx, kMethodName, - *cli_send_buffer.get(), &cli_cq_); + *cli_send_buffer.get(), srv_cq_.get()); call->StartCall(); ByteBuffer cli_recv_buffer; call->Finish(&cli_recv_buffer, &recv_status, tag(1)); @@ -226,7 +227,7 @@ TEST_F(GenericEnd2endTest, SequentialUnaryRpcs) { generic_service_.RequestCall(&srv_ctx, &stream, srv_cq_.get(), srv_cq_.get(), tag(4)); - verify_ok(srv_cq_.get(), 4, true); + server_ok(4); EXPECT_EQ(server_host_, srv_ctx.host().substr(0, server_host_.length())); EXPECT_EQ(kMethodName, srv_ctx.method()); @@ -245,7 +246,7 @@ TEST_F(GenericEnd2endTest, SequentialUnaryRpcs) { stream.Finish(Status::OK, tag(7)); server_ok(7); - client_ok(1); + verify_ok(srv_cq_.get(), 1, true); EXPECT_TRUE(ParseFromByteBuffer(&cli_recv_buffer, &recv_response)); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index aaf7b14313..c15ab88da1 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -33,11 +33,9 @@ #include <grpc/support/thd.h> #include <grpc/support/time.h> -extern "C" { #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" diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index cc5a4c7e64..a7647344c0 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -35,7 +35,7 @@ #include <grpc/support/time.h> #include <grpc++/impl/codegen/config.h> -extern "C" { + #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/lib/channel/channel_args.h" @@ -50,7 +50,6 @@ extern "C" { #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" -} #include "src/proto/grpc/lb/v1/load_balancer.pb.h" diff --git a/test/cpp/interop/interop_test.cc b/test/cpp/interop/interop_test.cc index c18fe1ec1f..1bf0d8d10f 100644 --- a/test/cpp/interop/interop_test.cc +++ b/test/cpp/interop/interop_test.cc @@ -37,10 +37,8 @@ #include "test/core/util/port.h" #include "test/cpp/util/test_config.h" -extern "C" { #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/support/string.h" -} DEFINE_string(extra_server_flags, "", "Extra flags to pass to server."); diff --git a/test/cpp/microbenchmarks/bm_arena.cc b/test/cpp/microbenchmarks/bm_arena.cc index 165b74670d..5b7c611919 100644 --- a/test/cpp/microbenchmarks/bm_arena.cc +++ b/test/cpp/microbenchmarks/bm_arena.cc @@ -18,9 +18,7 @@ /* Benchmark arenas */ -extern "C" { #include "src/core/lib/support/arena.h" -} #include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index 1c625c75c4..ec5c1275d1 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -29,7 +29,6 @@ #include <grpc/support/alloc.h> #include <grpc/support/string_util.h> -extern "C" { #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/deadline/deadline_filter.h" #include "src/core/ext/filters/http/client/http_client_filter.h" @@ -43,7 +42,6 @@ extern "C" { #include "src/core/lib/profiling/timers.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/transport_impl.h" -} #include "src/cpp/client/create_channel_internal.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index f8c31910fe..45f5382fde 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -22,14 +22,14 @@ #include <grpc/support/log.h> #include <string.h> #include <sstream> -extern "C" { + #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/timeout_encoding.h" -} + #include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" diff --git a/test/cpp/microbenchmarks/bm_closure.cc b/test/cpp/microbenchmarks/bm_closure.cc index d600ce77d9..458a2ceb13 100644 --- a/test/cpp/microbenchmarks/bm_closure.cc +++ b/test/cpp/microbenchmarks/bm_closure.cc @@ -22,12 +22,10 @@ #include <grpc/grpc.h> #include <sstream> -extern "C" { #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/support/spinlock.h" -} #include "test/cpp/microbenchmarks/helpers.h" diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 020ec0461c..dac702b08b 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -26,9 +26,7 @@ #include <grpc/support/log.h> #include "test/cpp/microbenchmarks/helpers.h" -extern "C" { #include "src/core/lib/surface/completion_queue.h" -} namespace grpc { namespace testing { diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc index 57a69acf01..8d4349a297 100644 --- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc +++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc @@ -25,11 +25,9 @@ #include <grpc/support/log.h> #include "test/cpp/microbenchmarks/helpers.h" -extern "C" { #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/surface/completion_queue.h" -} struct grpc_pollset { gpr_mu mu; diff --git a/test/cpp/microbenchmarks/bm_error.cc b/test/cpp/microbenchmarks/bm_error.cc index 56b80dfcf6..aa7822653f 100644 --- a/test/cpp/microbenchmarks/bm_error.cc +++ b/test/cpp/microbenchmarks/bm_error.cc @@ -21,10 +21,8 @@ #include <benchmark/benchmark.h> #include <memory> -extern "C" { #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/error_utils.h" -} #include "test/cpp/microbenchmarks/helpers.h" diff --git a/test/cpp/microbenchmarks/bm_metadata.cc b/test/cpp/microbenchmarks/bm_metadata.cc index 360bbabe13..1ed05f7466 100644 --- a/test/cpp/microbenchmarks/bm_metadata.cc +++ b/test/cpp/microbenchmarks/bm_metadata.cc @@ -21,10 +21,8 @@ #include <benchmark/benchmark.h> #include <grpc/grpc.h> -extern "C" { #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/static_metadata.h" -} #include "test/cpp/microbenchmarks/helpers.h" diff --git a/test/cpp/microbenchmarks/bm_pollset.cc b/test/cpp/microbenchmarks/bm_pollset.cc index eab1e89480..92d76f307e 100644 --- a/test/cpp/microbenchmarks/bm_pollset.cc +++ b/test/cpp/microbenchmarks/bm_pollset.cc @@ -23,12 +23,10 @@ #include <grpc/support/log.h> #include <grpc/support/useful.h> -extern "C" { #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" -} #include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h index 9d345a909b..71bbb393db 100644 --- a/test/cpp/microbenchmarks/fullstack_fixtures.h +++ b/test/cpp/microbenchmarks/fullstack_fixtures.h @@ -28,7 +28,6 @@ #include <grpc/support/atm.h> #include <grpc/support/log.h> -extern "C" { #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/endpoint.h" @@ -40,7 +39,6 @@ extern "C" { #include "src/core/lib/surface/server.h" #include "test/core/util/passthru_endpoint.h" #include "test/core/util/port.h" -} #include "src/cpp/client/create_channel_internal.h" #include "test/cpp/microbenchmarks/helpers.h" diff --git a/test/cpp/microbenchmarks/helpers.h b/test/cpp/microbenchmarks/helpers.h index b6cea7c317..07be589df6 100644 --- a/test/cpp/microbenchmarks/helpers.h +++ b/test/cpp/microbenchmarks/helpers.h @@ -22,11 +22,9 @@ #include <sstream> #include <vector> -extern "C" { #include <grpc/support/port_platform.h> #include "src/core/lib/debug/stats.h" #include "test/core/util/memory_counters.h" -} #include <benchmark/benchmark.h> #include <grpc++/impl/grpc_library.h> diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc index 205a68bca3..94adbcbd35 100644 --- a/test/cpp/naming/resolver_component_test.cc +++ b/test/cpp/naming/resolver_component_test.cc @@ -32,7 +32,6 @@ #include "test/cpp/util/subprocess.h" #include "test/cpp/util/test_config.h" -extern "C" { #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" @@ -47,7 +46,6 @@ extern "C" { #include "src/core/lib/support/string.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" -} using grpc::SubProcess; using std::vector; diff --git a/test/cpp/naming/resolver_component_tests_runner_invoker.cc b/test/cpp/naming/resolver_component_tests_runner_invoker.cc index 1577253a8f..7ea005cc1d 100644 --- a/test/cpp/naming/resolver_component_tests_runner_invoker.cc +++ b/test/cpp/naming/resolver_component_tests_runner_invoker.cc @@ -32,10 +32,8 @@ #include "test/cpp/util/subprocess.h" #include "test/cpp/util/test_config.h" -extern "C" { #include "src/core/lib/support/env.h" #include "test/core/util/port.h" -} DEFINE_bool( running_under_bazel, false, diff --git a/test/cpp/performance/writes_per_rpc_test.cc b/test/cpp/performance/writes_per_rpc_test.cc index f4f794cb88..6c23245021 100644 --- a/test/cpp/performance/writes_per_rpc_test.cc +++ b/test/cpp/performance/writes_per_rpc_test.cc @@ -26,7 +26,6 @@ #include <grpc/support/log.h> #include <gtest/gtest.h> -extern "C" { #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/endpoint.h" @@ -38,7 +37,7 @@ extern "C" { #include "src/core/lib/surface/server.h" #include "test/core/util/passthru_endpoint.h" #include "test/core/util/port.h" -} + #include "src/cpp/client/create_channel_internal.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/test_config.h" |