diff --git a/src/core/test/comp_node.cpp b/src/core/test/comp_node.cpp index 38ec36fd4db2c29a8f4487afac70d370f2435d41..e36d1fdeb841a27d7d25d60fcc31b04bfcadafeb 100644 --- a/src/core/test/comp_node.cpp +++ b/src/core/test/comp_node.cpp @@ -563,10 +563,11 @@ TEST(TestCompNodeSyncManager, DeviceWait) { cn2.device_wait_event(mgr.busy_wait_set_ready_and_get_event()); ev_cn1->record(); ev_cn2_end->record(); - EXPECT_LE(timer.get_secs(), 0.06); + std::this_thread::yield(); + EXPECT_LE(timer.get_secs(), 0.09); ev_cn1->host_wait(); - EXPECT_GE(timer.get_secs(), 0.1); + EXPECT_GE(timer.get_secs(), 0.12); ev_cn2_end->host_wait(); auto ev2_t = ev_cn2_begin->elapsed_time_until(*ev_cn2_end); EXPECT_GE(ev2_t, 0.1); diff --git a/src/core/test/utils/async_worker.cpp b/src/core/test/utils/async_worker.cpp index 7fb6eac78d40807eca5a052d48158c37e8f91ea5..5b31735e4ff8a11312dd933c1287e6d55ee0da5d 100644 --- a/src/core/test/utils/async_worker.cpp +++ b/src/core/test/utils/async_worker.cpp @@ -87,8 +87,8 @@ TEST(TestAsyncWorker, AsyncWorkerSetException) { std::this_thread::sleep_for(100ms); }); - timer.reset(); worker_set.start(); + timer.reset(); ASSERT_THROW(worker_set.wait_all(), std::runtime_error); ASSERT_LT(timer.get_msecs(), 100); }