aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-10-04 14:52:13 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-10-04 14:52:13 -0700
commitcb954cfc2858829fe7bff785b1a5d5204bfd338f (patch)
tree92295094d67005673e441a21e1f0a0226b781b1c /test
parent0dfbdf6e54e73a71823907a60aeb62717a4c81df (diff)
Removed exec_ctx from cq_alarm's functions
Diffstat (limited to 'test')
-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) {