diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-21 19:38:09 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-21 19:38:09 -0800 |
commit | a13a8c0f3ea9bdf70680c0c8b5667186c832a412 (patch) | |
tree | 399711ebc0b87ac658c1a5c5cad0c58b9012fbe8 /test/core/iomgr/timer_list_test.cc | |
parent | 7486144de0577e3e9453feec328741180d1f1bfa (diff) |
A few src/core fixes due to missing exec_ctx_finish
Diffstat (limited to 'test/core/iomgr/timer_list_test.cc')
-rw-r--r-- | test/core/iomgr/timer_list_test.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/core/iomgr/timer_list_test.cc b/test/core/iomgr/timer_list_test.cc index a4a53a0e46..329b767f32 100644 --- a/test/core/iomgr/timer_list_test.cc +++ b/test/core/iomgr/timer_list_test.cc @@ -72,7 +72,7 @@ static void add_test(void) { /* collect timers. Only the first batch should be ready. */ grpc_core::ExecCtx::Get()->TestOnlySetNow(start + 500); GPR_ASSERT(grpc_timer_check(nullptr) == GRPC_TIMERS_FIRED); - + grpc_core::ExecCtx::Get()->Flush(); for (i = 0; i < 20; i++) { GPR_ASSERT(cb_called[i][1] == (i < 10)); GPR_ASSERT(cb_called[i][0] == 0); @@ -80,7 +80,7 @@ static void add_test(void) { grpc_core::ExecCtx::Get()->TestOnlySetNow(start + 600); GPR_ASSERT(grpc_timer_check(nullptr) == GRPC_TIMERS_CHECKED_AND_EMPTY); - + grpc_core::ExecCtx::Get()->Flush(); for (i = 0; i < 30; i++) { GPR_ASSERT(cb_called[i][1] == (i < 10)); GPR_ASSERT(cb_called[i][0] == 0); @@ -89,7 +89,7 @@ static void add_test(void) { /* collect the rest of the timers */ grpc_core::ExecCtx::Get()->TestOnlySetNow(start + 1500); GPR_ASSERT(grpc_timer_check(nullptr) == GRPC_TIMERS_FIRED); - + grpc_core::ExecCtx::Get()->Flush(); for (i = 0; i < 30; i++) { GPR_ASSERT(cb_called[i][1] == (i < 20)); GPR_ASSERT(cb_called[i][0] == 0); @@ -135,16 +135,16 @@ void destruction_test(void) { GRPC_CLOSURE_CREATE(cb, (void*)(intptr_t)4, grpc_schedule_on_exec_ctx)); grpc_core::ExecCtx::Get()->TestOnlySetNow(2); GPR_ASSERT(grpc_timer_check(nullptr) == GRPC_TIMERS_FIRED); - + grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(1 == cb_called[4][1]); grpc_timer_cancel(&timers[0]); grpc_timer_cancel(&timers[3]); - + grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(1 == cb_called[0][0]); GPR_ASSERT(1 == cb_called[3][0]); grpc_timer_list_shutdown(); - + grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(1 == cb_called[1][0]); GPR_ASSERT(1 == cb_called[2][0]); } |