diff options
author | 2016-07-08 16:57:42 -0700 | |
---|---|---|
committer | 2016-07-08 16:57:42 -0700 | |
commit | a36857da24b126300234f86450a61b7b2a7d0daa (patch) | |
tree | 2e28b10a538d08df42014f006a7864f97db1233b /test/core/iomgr | |
parent | 919175b6194e28476626b235ae4fe02caede0bcf (diff) |
Progress on a finalization list
Diffstat (limited to 'test/core/iomgr')
-rw-r--r-- | test/core/iomgr/combiner_test.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/core/iomgr/combiner_test.c b/test/core/iomgr/combiner_test.c index 925a4f81ad..d9f7601722 100644 --- a/test/core/iomgr/combiner_test.c +++ b/test/core/iomgr/combiner_test.c @@ -120,12 +120,26 @@ static void test_execute_many(void) { grpc_combiner_destroy(lock); } +static void test_execute_finally(void) { + gpr_log(GPR_DEBUG, "test_execute_finally"); + + grpc_combiner *lock = grpc_combiner_create(NULL); + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_combiner_execute(&exec_ctx, lock, grpc_closure_create(add_finally, lock), + GRPC_ERROR_NONE); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + grpc_combiner_destroy(lock); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); test_no_op(); test_execute_one(); test_execute_many(); + test_execute_finally(); grpc_shutdown(); return 0; |