From cfab6b48ab5b40d3bb47e3334570c12edeb2ab14 Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Mon, 2 Mar 2020 15:05:53 -0800 Subject: [PATCH] Module: Increase StopTimeout to 2000 ms We need to expect longer time, because we need to wait for Queue unregistration (next patch) to be done during module shutdown Bug: 150174451 Bug: 150054218 Test: bluetooth_test_gd Change-Id: If8a45b2df2f2210884e0901029c151c80fab0684 --- gd/module.cc | 2 +- gd/module_unittest.cc | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/gd/module.cc b/gd/module.cc index a0fc31ad7..2136b822e 100644 --- a/gd/module.cc +++ b/gd/module.cc @@ -21,7 +21,7 @@ using ::bluetooth::os::Thread; namespace bluetooth { -constexpr std::chrono::milliseconds kModuleStopTimeout = std::chrono::milliseconds(20); +constexpr std::chrono::milliseconds kModuleStopTimeout = std::chrono::milliseconds(2000); ModuleFactory::ModuleFactory(std::function ctor) : ctor_(ctor) { } diff --git a/gd/module_unittest.cc b/gd/module_unittest.cc index 5d9564f38..1ee1a8d7f 100644 --- a/gd/module_unittest.cc +++ b/gd/module_unittest.cc @@ -59,7 +59,6 @@ class TestModuleNoDependency : public Module { void Stop() override { // A module is not considered stopped until after Stop() finishes - test_module_no_dependency_handler = nullptr; EXPECT_TRUE(GetModuleRegistry()->IsStarted()); } }; @@ -88,7 +87,6 @@ class TestModuleOneDependency : public Module { } void Stop() override { - test_module_one_dependency_handler = GetHandler(); EXPECT_TRUE(GetModuleRegistry()->IsStarted()); // A module is not considered stopped until after Stop() finishes -- 2.11.0