diff options
-rw-r--r-- | test/core/iomgr/workqueue_test.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/core/iomgr/workqueue_test.c b/test/core/iomgr/workqueue_test.c index 874e696fc2..953cc35ee6 100644 --- a/test/core/iomgr/workqueue_test.c +++ b/test/core/iomgr/workqueue_test.c @@ -73,8 +73,10 @@ static void test_add_closure(void) { gpr_mu_lock(g_mu); GPR_ASSERT(!done); - grpc_pollset_work(&exec_ctx, g_pollset, &worker, gpr_now(deadline.clock_type), - deadline); + while (!done) { + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(deadline.clock_type), deadline); + } gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); @@ -97,9 +99,10 @@ static void test_flush(void) { grpc_workqueue_add_to_pollset(&exec_ctx, wq, g_pollset); gpr_mu_lock(g_mu); - GPR_ASSERT(!done); - grpc_pollset_work(&exec_ctx, g_pollset, &worker, gpr_now(deadline.clock_type), - deadline); + while (!done) { + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(deadline.clock_type), deadline); + } gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); |