diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-12-08 09:30:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-08 09:30:40 -0800 |
commit | 94e676e10f8c739289924b8458a246699e3623ce (patch) | |
tree | e223fa15a4c6e22582771a456bfb58d844c96485 /test/cpp/end2end | |
parent | a25697095b39ce4014457a64c2917c5abadbe998 (diff) | |
parent | 9e5dc246eebdc3b7c7dc4d75f35d3697bee90d9a (diff) |
Merge pull request #13659 from grpc/revert-13658-revert-13058-execctx
Revert "Revert "All instances of exec_ctx being passed around in src/core removed""
Diffstat (limited to 'test/cpp/end2end')
-rw-r--r-- | test/cpp/end2end/client_lb_end2end_test.cc | 13 | ||||
-rw-r--r-- | test/cpp/end2end/filter_end2end_test.cc | 7 | ||||
-rw-r--r-- | test/cpp/end2end/grpclb_end2end_test.cc | 11 |
3 files changed, 14 insertions, 17 deletions
diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index 2696826ed8..e83a6e675e 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -112,13 +112,13 @@ class ClientLbEnd2endTest : public ::testing::Test { } void SetNextResolution(const std::vector<int>& ports) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_core::ExecCtx exec_ctx; grpc_lb_addresses* addresses = grpc_lb_addresses_create(ports.size(), nullptr); for (size_t i = 0; i < ports.size(); ++i) { char* lb_uri_str; gpr_asprintf(&lb_uri_str, "ipv4:127.0.0.1:%d", ports[i]); - grpc_uri* lb_uri = grpc_uri_parse(&exec_ctx, lb_uri_str, true); + grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str, true); GPR_ASSERT(lb_uri != nullptr); grpc_lb_addresses_set_address_from_uri(addresses, i, lb_uri, false /* is balancer */, @@ -130,11 +130,10 @@ class ClientLbEnd2endTest : public ::testing::Test { grpc_lb_addresses_create_channel_arg(addresses); grpc_channel_args* fake_result = grpc_channel_args_copy_and_add(nullptr, &fake_addresses, 1); - grpc_fake_resolver_response_generator_set_response( - &exec_ctx, response_generator_, fake_result); - grpc_channel_args_destroy(&exec_ctx, fake_result); - grpc_lb_addresses_destroy(&exec_ctx, addresses); - grpc_exec_ctx_finish(&exec_ctx); + grpc_fake_resolver_response_generator_set_response(response_generator_, + fake_result); + grpc_channel_args_destroy(fake_result); + grpc_lb_addresses_destroy(addresses); } void ResetStub(const grpc::string& lb_policy_name = "") { diff --git a/test/cpp/end2end/filter_end2end_test.cc b/test/cpp/end2end/filter_end2end_test.cc index f260ea0016..c4430379db 100644 --- a/test/cpp/end2end/filter_end2end_test.cc +++ b/test/cpp/end2end/filter_end2end_test.cc @@ -100,7 +100,7 @@ int GetCallCounterValue() { class ChannelDataImpl : public ChannelData { public: - grpc_error* Init(grpc_exec_ctx* exec_ctx, grpc_channel_element* elem, + grpc_error* Init(grpc_channel_element* elem, grpc_channel_element_args* args) { IncrementConnectionCounter(); return GRPC_ERROR_NONE; @@ -109,13 +109,12 @@ class ChannelDataImpl : public ChannelData { class CallDataImpl : public CallData { public: - void StartTransportStreamOpBatch(grpc_exec_ctx* exec_ctx, - grpc_call_element* elem, + void StartTransportStreamOpBatch(grpc_call_element* elem, TransportStreamOpBatch* op) override { // Incrementing the counter could be done from Init(), but we want // to test that the individual methods are actually called correctly. if (op->recv_initial_metadata() != nullptr) IncrementCallCounter(); - grpc_call_next_op(exec_ctx, elem, op->op()); + grpc_call_next_op(elem, op->op()); } }; diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index bbf3da4663..d4ee6b429f 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -454,13 +454,13 @@ class GrpclbEnd2endTest : public ::testing::Test { }; void SetNextResolution(const std::vector<AddressData>& address_data) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_core::ExecCtx exec_ctx; grpc_lb_addresses* addresses = grpc_lb_addresses_create(address_data.size(), nullptr); for (size_t i = 0; i < address_data.size(); ++i) { char* lb_uri_str; gpr_asprintf(&lb_uri_str, "ipv4:127.0.0.1:%d", address_data[i].port); - grpc_uri* lb_uri = grpc_uri_parse(&exec_ctx, lb_uri_str, true); + grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str, true); GPR_ASSERT(lb_uri != nullptr); grpc_lb_addresses_set_address_from_uri( addresses, i, lb_uri, address_data[i].is_balancer, @@ -470,10 +470,9 @@ class GrpclbEnd2endTest : public ::testing::Test { } grpc_arg fake_addresses = grpc_lb_addresses_create_channel_arg(addresses); grpc_channel_args fake_result = {1, &fake_addresses}; - grpc_fake_resolver_response_generator_set_response( - &exec_ctx, response_generator_, &fake_result); - grpc_lb_addresses_destroy(&exec_ctx, addresses); - grpc_exec_ctx_finish(&exec_ctx); + grpc_fake_resolver_response_generator_set_response(response_generator_, + &fake_result); + grpc_lb_addresses_destroy(addresses); } const std::vector<int> GetBackendPorts(const size_t start_index = 0) const { |