aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/surface/completion_queue_threading_test.c
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2017-03-02 16:37:59 -0800
committerGravatar Sree Kuchibhotla <sreek@google.com>2017-03-02 16:37:59 -0800
commit6b45d012466025c227eead4cf2c9f5abe28ea0dc (patch)
treea851a0b6e5cd67a8e7da9e13489970ef1c22036a /test/core/surface/completion_queue_threading_test.c
parent4f31f44f344bdb1da1429db830989a3aced27b8a (diff)
fix tests after rebase
Diffstat (limited to 'test/core/surface/completion_queue_threading_test.c')
-rw-r--r--test/core/surface/completion_queue_threading_test.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/test/core/surface/completion_queue_threading_test.c b/test/core/surface/completion_queue_threading_test.c
index 0945597284..b101cd13f7 100644
--- a/test/core/surface/completion_queue_threading_test.c
+++ b/test/core/surface/completion_queue_threading_test.c
@@ -52,7 +52,24 @@ static void *create_test_tag(void) {
static void shutdown_and_destroy(grpc_completion_queue *cc) {
grpc_event ev;
grpc_completion_queue_shutdown(cc);
- ev = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
+
+ switch (grpc_get_cq_completion_type(cc)) {
+ case GRPC_CQ_NEXT: {
+ ev = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME),
+ NULL);
+ break;
+ }
+ case GRPC_CQ_PLUCK: {
+ ev = grpc_completion_queue_pluck(cc, create_test_tag(),
+ gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
+ break;
+ }
+ default: {
+ gpr_log(GPR_ERROR, "Unknown completion type");
+ break;
+ }
+ }
+
GPR_ASSERT(ev.type == GRPC_QUEUE_SHUTDOWN);
grpc_completion_queue_destroy(cc);
}