From 2b9ab6d10cc279000c8f0b5df152ef16c5062f05 Mon Sep 17 00:00:00 2001 From: Prashant Jaikumar Date: Fri, 23 Aug 2019 13:54:16 -0700 Subject: [PATCH] timer_test: add test case for grpc shutdown while timer is pending --- test/cpp/common/timer_test.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/cpp/common/timer_test.cc b/test/cpp/common/timer_test.cc index 0ce6633088f..9b23be2885a 100644 --- a/test/cpp/common/timer_test.cc +++ b/test/cpp/common/timer_test.cc @@ -155,6 +155,20 @@ TEST_F(TimerTest, CancelSomeTimers) { gpr_log(GPR_DEBUG, "wakeups: %" PRId64 "", wakeups); } +// Enable the following test after +// https://github.com/grpc/grpc/issues/20049 has been fixed. +#if 0 +TEST_F(TimerTest, TimerNotCanceled) { + grpc_core::ExecCtx exec_ctx; + grpc_timer timer; + grpc_timer_init(&timer, 10000, + GRPC_CLOSURE_CREATE( + [](void*, grpc_error*) { + }, + nullptr, grpc_schedule_on_exec_ctx)); +} +#endif + int main(int argc, char** argv) { grpc::testing::TestEnvironment env(argc, argv); ::testing::InitGoogleTest(&argc, argv);