From b4565f1b19a60f7e89806454b27f83e188381d81 Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 5 Dec 2018 15:01:37 -0800 Subject: [PATCH] Wait for shutdown to finish in TestEnv --- test/core/util/test_config.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/core/util/test_config.cc b/test/core/util/test_config.cc index fe80bb2d4d0..f5855a60c98 100644 --- a/test/core/util/test_config.cc +++ b/test/core/util/test_config.cc @@ -31,6 +31,7 @@ #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/useful.h" +#include "src/core/lib/surface/init.h" int64_t g_fixture_slowdown_factor = 1; int64_t g_poller_slowdown_factor = 1; @@ -405,7 +406,9 @@ TestEnvironment::TestEnvironment(int argc, char** argv) { grpc_test_init(argc, argv); } -TestEnvironment::~TestEnvironment() {} +TestEnvironment::~TestEnvironment() { + grpc_maybe_wait_for_async_shutdown(); +} } // namespace testing } // namespace grpc