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

Commit 1c0d4937 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Fix RepeatingAlarmTest

We may not be cancel the alarm within 1 millisecond for some machine.
Make it a bit longer.

Test: bluetooth_test_gd
Change-Id: Ia0eae89b8022d41281db55c152dbb748332f2dee
parent 20f22889
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -95,9 +95,9 @@ TEST_F(RepeatingAlarmTest, schedule) {
}

TEST_F(RepeatingAlarmTest, cancel_alarm) {
  alarm_->Schedule(should_not_happen_, std::chrono::milliseconds(1));
  alarm_->Schedule(should_not_happen_, std::chrono::milliseconds(10));
  alarm_->Cancel();
  std::this_thread::sleep_for(std::chrono::milliseconds(5));
  std::this_thread::sleep_for(std::chrono::milliseconds(50));
}

TEST_F(RepeatingAlarmTest, cancel_alarm_from_callback) {