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/core/surface/lame_client_test.cc | |
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/core/surface/lame_client_test.cc')
-rw-r--r-- | test/core/surface/lame_client_test.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/test/core/surface/lame_client_test.cc b/test/core/surface/lame_client_test.cc index f3df7f35a7..4bf40569e6 100644 --- a/test/core/surface/lame_client_test.cc +++ b/test/core/surface/lame_client_test.cc @@ -32,20 +32,19 @@ grpc_closure transport_op_cb; static void* tag(intptr_t x) { return (void*)x; } -void verify_connectivity(grpc_exec_ctx* exec_ctx, void* arg, - grpc_error* error) { +void verify_connectivity(void* arg, grpc_error* error) { grpc_connectivity_state* state = static_cast<grpc_connectivity_state*>(arg); GPR_ASSERT(GRPC_CHANNEL_SHUTDOWN == *state); GPR_ASSERT(error == GRPC_ERROR_NONE); } -void do_nothing(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) {} +void do_nothing(void* arg, grpc_error* error) {} void test_transport_op(grpc_channel* channel) { grpc_transport_op* op; grpc_channel_element* elem; grpc_connectivity_state state = GRPC_CHANNEL_IDLE; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_core::ExecCtx exec_ctx; GRPC_CLOSURE_INIT(&transport_op_cb, verify_connectivity, &state, grpc_schedule_on_exec_ctx); @@ -54,14 +53,12 @@ void test_transport_op(grpc_channel* channel) { op->on_connectivity_state_change = &transport_op_cb; op->connectivity_state = &state; elem = grpc_channel_stack_element(grpc_channel_get_channel_stack(channel), 0); - elem->filter->start_transport_op(&exec_ctx, elem, op); - grpc_exec_ctx_finish(&exec_ctx); + elem->filter->start_transport_op(elem, op); GRPC_CLOSURE_INIT(&transport_op_cb, do_nothing, nullptr, grpc_schedule_on_exec_ctx); op = grpc_make_transport_op(&transport_op_cb); - elem->filter->start_transport_op(&exec_ctx, elem, op); - grpc_exec_ctx_finish(&exec_ctx); + elem->filter->start_transport_op(elem, op); } int main(int argc, char** argv) { |