diff options
author | Craig Tiller <ctiller@google.com> | 2015-05-28 12:44:27 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-05-28 12:44:27 -0700 |
commit | 44883302c32773bc3959ddf06c46727acb7cc328 (patch) | |
tree | 36ab395d6f92934e1a71b47c7eb5d9440e1dfe15 /test | |
parent | 0f29c4d375203019da5417ee8577f8cbb996e133 (diff) |
Remove condition variable from pollset
Diffstat (limited to 'test')
-rw-r--r-- | test/core/end2end/tests/cancel_in_a_vacuum.c | 5 | ||||
-rw-r--r-- | test/core/surface/completion_queue_test.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/test/core/end2end/tests/cancel_in_a_vacuum.c b/test/core/end2end/tests/cancel_in_a_vacuum.c index 1b235b78e9..c380b79b94 100644 --- a/test/core/end2end/tests/cancel_in_a_vacuum.c +++ b/test/core/end2end/tests/cancel_in_a_vacuum.c @@ -46,6 +46,8 @@ enum { TIMEOUT = 200000 }; +static void *tag(gpr_intptr t) { return (void *)t; } + static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, const char *test_name, grpc_channel_args *client_args, @@ -73,7 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; - grpc_server_shutdown(f->server); + grpc_server_shutdown_and_notify(f->server, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5)).type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index e26f379bfc..bca517349c 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -225,8 +225,6 @@ static void test_threading(int producers, int consumers) { gpr_log(GPR_INFO, "%s: %d producers, %d consumers", "test_threading", producers, consumers); - grpc_completion_queue_dont_poll_test_only(cc); - /* start all threads: they will wait for phase1 */ for (i = 0; i < producers + consumers; i++) { gpr_thd_id id; |