aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/surface
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/surface')
-rw-r--r--test/core/surface/completion_queue_test.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c
index 785093c60f..16bccc3609 100644
--- a/test/core/surface/completion_queue_test.c
+++ b/test/core/surface/completion_queue_test.c
@@ -104,7 +104,6 @@ static void test_cq_end_op(void) {
static void test_cq_alarm(void) {
grpc_completion_queue *cc;
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
LOG_TEST("test_cq_alarm");
cc = grpc_completion_queue_create(NULL);
@@ -112,35 +111,32 @@ static void test_cq_alarm(void) {
/* regular expiry */
grpc_event ev;
void *tag = create_test_tag();
- grpc_cq_alarm *cq_alarm = grpc_cq_alarm_create(
- &exec_ctx, cc, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), tag);
+ grpc_cq_alarm *cq_alarm =
+ grpc_cq_alarm_create(cc, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), tag);
ev = grpc_completion_queue_next(cc, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(2),
NULL);
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
GPR_ASSERT(ev.tag == tag);
GPR_ASSERT(ev.success);
- grpc_cq_alarm_destroy(&exec_ctx, cq_alarm);
+ grpc_cq_alarm_destroy(cq_alarm);
}
{
/* cancellation */
grpc_event ev;
void *tag = create_test_tag();
- grpc_cq_alarm *cq_alarm = grpc_cq_alarm_create(
- &exec_ctx, cc, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(2), tag);
+ grpc_cq_alarm *cq_alarm =
+ grpc_cq_alarm_create(cc, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(2), tag);
- grpc_cq_alarm_cancel(&exec_ctx, cq_alarm);
- GPR_ASSERT(grpc_exec_ctx_flush(&exec_ctx) == 1);
+ grpc_cq_alarm_cancel(cq_alarm);
ev = grpc_completion_queue_next(cc, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1),
NULL);
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
GPR_ASSERT(ev.tag == tag);
GPR_ASSERT(ev.success == 0);
- grpc_cq_alarm_destroy(&exec_ctx, cq_alarm);
+ grpc_cq_alarm_destroy(cq_alarm);
}
-
shutdown_and_destroy(cc);
- grpc_exec_ctx_finish(&exec_ctx);
}
static void test_shutdown_then_next_polling(void) {