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

Commit e61e7796 authored by William Escande's avatar William Escande
Browse files

Gd Test fix sync handler wait

Fix: 262546952
Test: atest LeAclConnectionTest (with repeat=300)
Change-Id: If32711f784d82bc713d2ace3ad5b8a345dccfb14
parent 139dd127
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -182,13 +182,8 @@ class LeAclConnectionTest : public ::testing::Test {
  }

  void sync_handler() {
    ASSERT(handler_ != nullptr);

    auto promise = std::promise<void>();
    auto future = promise.get_future();
    handler_->BindOnceOn(&promise, &std::promise<void>::set_value).Invoke();
    auto status = future.wait_for(2s);
    ASSERT_EQ(status, std::future_status::ready);
    ASSERT(thread_ != nullptr);
    ASSERT_TRUE(thread_->GetReactor()->WaitForIdle(2s));
  }

  AddressWithType address_1 =