aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks/fullstack_fixtures.h
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-12-06 09:05:05 -0800
committerGravatar GitHub <noreply@github.com>2017-12-06 09:05:05 -0800
commitad4d2dde0052efbbf49d64b0843c45f0381cfeb3 (patch)
tree6a657f8c6179d873b34505cdc24bce9462ca68eb /test/cpp/microbenchmarks/fullstack_fixtures.h
parenta3df36cc2505a89c2f481eea4a66a87b3002844a (diff)
Revert "All instances of exec_ctx being passed around in src/core removed"
Diffstat (limited to 'test/cpp/microbenchmarks/fullstack_fixtures.h')
-rw-r--r--test/cpp/microbenchmarks/fullstack_fixtures.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h
index d1ede755a5..7e20843875 100644
--- a/test/cpp/microbenchmarks/fullstack_fixtures.h
+++ b/test/cpp/microbenchmarks/fullstack_fixtures.h
@@ -166,7 +166,7 @@ class EndpointPairFixture : public BaseFixture {
fixture_configuration.ApplyCommonServerBuilderConfig(&b);
server_ = b.BuildAndStart();
- grpc_core::ExecCtx exec_ctx;
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
/* add server endpoint to server_
* */
@@ -174,19 +174,20 @@ class EndpointPairFixture : public BaseFixture {
const grpc_channel_args* server_args =
grpc_server_get_channel_args(server_->c_server());
server_transport_ = grpc_create_chttp2_transport(
- server_args, endpoints.server, false /* is_client */);
+ &exec_ctx, server_args, endpoints.server, false /* is_client */);
grpc_pollset** pollsets;
size_t num_pollsets = 0;
grpc_server_get_pollsets(server_->c_server(), &pollsets, &num_pollsets);
for (size_t i = 0; i < num_pollsets; i++) {
- grpc_endpoint_add_to_pollset(endpoints.server, pollsets[i]);
+ grpc_endpoint_add_to_pollset(&exec_ctx, endpoints.server, pollsets[i]);
}
- grpc_server_setup_transport(server_->c_server(), server_transport_,
- nullptr, server_args);
- grpc_chttp2_transport_start_reading(server_transport_, nullptr, nullptr);
+ grpc_server_setup_transport(&exec_ctx, server_->c_server(),
+ server_transport_, nullptr, server_args);
+ grpc_chttp2_transport_start_reading(&exec_ctx, server_transport_, nullptr,
+ nullptr);
}
/* create channel */
@@ -196,15 +197,19 @@ class EndpointPairFixture : public BaseFixture {
fixture_configuration.ApplyCommonChannelArguments(&args);
grpc_channel_args c_args = args.c_channel_args();
- client_transport_ =
- grpc_create_chttp2_transport(&c_args, endpoints.client, true);
+ client_transport_ = grpc_create_chttp2_transport(&exec_ctx, &c_args,
+ endpoints.client, true);
GPR_ASSERT(client_transport_);
- grpc_channel* channel = grpc_channel_create(
- "target", &c_args, GRPC_CLIENT_DIRECT_CHANNEL, client_transport_);
- grpc_chttp2_transport_start_reading(client_transport_, nullptr, nullptr);
+ grpc_channel* channel =
+ grpc_channel_create(&exec_ctx, "target", &c_args,
+ GRPC_CLIENT_DIRECT_CHANNEL, client_transport_);
+ grpc_chttp2_transport_start_reading(&exec_ctx, client_transport_, nullptr,
+ nullptr);
channel_ = CreateChannelInternal("", channel);
}
+
+ grpc_exec_ctx_finish(&exec_ctx);
}
virtual ~EndpointPairFixture() {