diff options
Diffstat (limited to 'test/core/surface/completion_queue_test.c')
-rw-r--r-- | test/core/surface/completion_queue_test.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index e6372a379c..21e23fd500 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -120,8 +120,7 @@ static void test_wait_empty(void) { } } -static void do_nothing_end_completion(grpc_exec_ctx *exec_ctx, void *arg, - grpc_cq_completion *c) {} +static void do_nothing_end_completion(void *arg, grpc_cq_completion *c) {} static void test_cq_end_op(void) { grpc_event ev; @@ -130,8 +129,6 @@ static void test_cq_end_op(void) { grpc_cq_polling_type polling_types[] = { GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING}; grpc_completion_queue_attributes attr; - grpc_exec_ctx init_exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_exec_ctx exec_ctx; void *tag = create_test_tag(); LOG_TEST("test_cq_end_op"); @@ -139,14 +136,13 @@ static void test_cq_end_op(void) { attr.version = 1; attr.cq_completion_type = GRPC_CQ_NEXT; for (size_t i = 0; i < GPR_ARRAY_SIZE(polling_types); i++) { - exec_ctx = init_exec_ctx; // Reset exec_ctx attr.cq_polling_type = polling_types[i]; cc = grpc_completion_queue_create( grpc_completion_queue_factory_lookup(&attr), &attr, NULL); GPR_ASSERT(grpc_cq_begin_op(cc, tag)); - grpc_cq_end_op(&exec_ctx, cc, tag, GRPC_ERROR_NONE, - do_nothing_end_completion, NULL, &completion); + grpc_cq_end_op(cc, tag, GRPC_ERROR_NONE, do_nothing_end_completion, NULL, + &completion); ev = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME), NULL); GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); @@ -154,7 +150,7 @@ static void test_cq_end_op(void) { GPR_ASSERT(ev.success); shutdown_and_destroy(cc); - grpc_exec_ctx_finish(&exec_ctx); + grpc_exec_ctx_finish(); } } @@ -211,8 +207,6 @@ static void test_pluck(void) { grpc_cq_polling_type polling_types[] = { GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING}; grpc_completion_queue_attributes attr; - grpc_exec_ctx init_exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_exec_ctx exec_ctx; unsigned i, j; LOG_TEST("test_pluck"); @@ -227,15 +221,14 @@ static void test_pluck(void) { attr.version = 1; attr.cq_completion_type = GRPC_CQ_PLUCK; for (size_t pidx = 0; pidx < GPR_ARRAY_SIZE(polling_types); pidx++) { - exec_ctx = init_exec_ctx; // reset exec_ctx attr.cq_polling_type = polling_types[pidx]; cc = grpc_completion_queue_create( grpc_completion_queue_factory_lookup(&attr), &attr, NULL); for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { GPR_ASSERT(grpc_cq_begin_op(cc, tags[i])); - grpc_cq_end_op(&exec_ctx, cc, tags[i], GRPC_ERROR_NONE, - do_nothing_end_completion, NULL, &completions[i]); + grpc_cq_end_op(cc, tags[i], GRPC_ERROR_NONE, do_nothing_end_completion, + NULL, &completions[i]); } for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { @@ -246,8 +239,8 @@ static void test_pluck(void) { for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { GPR_ASSERT(grpc_cq_begin_op(cc, tags[i])); - grpc_cq_end_op(&exec_ctx, cc, tags[i], GRPC_ERROR_NONE, - do_nothing_end_completion, NULL, &completions[i]); + grpc_cq_end_op(cc, tags[i], GRPC_ERROR_NONE, do_nothing_end_completion, + NULL, &completions[i]); } for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { @@ -257,7 +250,7 @@ static void test_pluck(void) { } shutdown_and_destroy(cc); - grpc_exec_ctx_finish(&exec_ctx); + grpc_exec_ctx_finish(); } } |