From 252f1b005b3e75a9c207227524867a6bc46c461b Mon Sep 17 00:00:00 2001
From: Olivier Dion <olivier.dion@polymtl.ca>
Date: Mon, 10 May 2021 17:07:51 -0400
Subject: [PATCH] unitTest/scheduler: Increase timeout

2 seconds is too short on some system to spawn 1024 threads.  Increase this by a
second.  This is highly system dependent and we might want to change the logic
of the test instead.

Gitlab: #545
Change-Id: Id939ad4809e47a2cdce19885387464289110e137
---
 test/unitTest/scheduler.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/unitTest/scheduler.cpp b/test/unitTest/scheduler.cpp
index 879e606931..4032e6945c 100644
--- a/test/unitTest/scheduler.cpp
+++ b/test/unitTest/scheduler.cpp
@@ -71,14 +71,14 @@ SchedulerTest::schedulerTest()
     for (unsigned i=0; i<N; i++)
         executor.run(task);
 
-    CPPUNIT_ASSERT(cv.wait_for(lk, std::chrono::seconds(2), [&]{
+    CPPUNIT_ASSERT(cv.wait_for(lk, std::chrono::seconds(3), [&]{
         return taskRun == N;
     }));
 
     for (unsigned i=0; i<N; i++)
         executor.scheduleIn(task, std::chrono::microseconds(1));
 
-    CPPUNIT_ASSERT(cv.wait_for(lk, std::chrono::seconds(2), [&]{
+    CPPUNIT_ASSERT(cv.wait_for(lk, std::chrono::seconds(3), [&]{
         return taskRun == 2 * N;
     }));
 
-- 
GitLab