Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddc18434 authored by Chris Manton's avatar Chris Manton
Browse files

btif_hh_test: Prefer test SetUp/TearDown chained w/out interruption

Bug: 311714808
Test: atest net_test_btif_hh

Change-Id: I6eb427b218f210dc2a1f7af4dfa44ee75dc95351
parent 6d5ee5d3
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -23,12 +23,9 @@
#include <future>
#include <vector>

#include "bta/hh/bta_hh_int.h"
#include "bta/include/bta_ag_api.h"
#include "bta/include/bta_hh_api.h"
#include "btcore/include/module.h"
#include "btif/include/btif_api.h"
#include "btif/include/stack_manager.h"
#include "include/hardware/bt_hh.h"
#include "osi/include/allocator.h"
#include "test/common/core_interface.h"
@@ -39,6 +36,7 @@ using namespace std::chrono_literals;

void set_hal_cbacks(bt_callbacks_t* callbacks);

// Used the legacy stack manager
module_t bt_utils_module;
module_t gd_controller_module;
module_t gd_shim_module;
@@ -144,8 +142,8 @@ class BtifHhWithMockTest : public ::testing::Test {
class BtifHhWithHalCallbacksTest : public BtifHhWithMockTest {
 protected:
  void SetUp() override {
    bluetooth::common::InitFlags::SetAllForTesting();
    BtifHhWithMockTest::SetUp();
    bluetooth::common::InitFlags::SetAllForTesting();
    g_thread_evt_promise = std::promise<bt_cb_thread_evt>();
    auto future = g_thread_evt_promise.get_future();
    bt_callbacks.thread_evt_cb = [](bt_cb_thread_evt evt) {