aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/core/surface/completion_queue_test.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c
index e3fc789788..7a5cf30506 100644
--- a/test/core/surface/completion_queue_test.c
+++ b/test/core/surface/completion_queue_test.c
@@ -175,6 +175,19 @@ static void test_pluck(void) {
grpc_exec_ctx_finish(&exec_ctx);
}
+static void test_pluck_after_shutdown(void) {
+ grpc_event ev;
+ grpc_completion_queue *cc;
+
+ LOG_TEST("test_pluck_after_shutdown");
+ cc = grpc_completion_queue_create(NULL);
+ grpc_completion_queue_shutdown(cc);
+ ev = grpc_completion_queue_pluck(cc, NULL, gpr_inf_future(GPR_CLOCK_REALTIME),
+ NULL);
+ GPR_ASSERT(ev.type == GRPC_QUEUE_SHUTDOWN);
+ grpc_completion_queue_destroy(cc);
+}
+
#define TEST_THREAD_EVENTS 10000
typedef struct test_thread_options {
@@ -343,6 +356,7 @@ int main(int argc, char **argv) {
test_shutdown_then_next_with_timeout();
test_cq_end_op();
test_pluck();
+ test_pluck_after_shutdown();
test_threading(1, 1);
test_threading(1, 10);
test_threading(10, 1);