Skip to content
Snippets Groups Projects
Commit 252f1b00 authored by Olivier Dion's avatar Olivier Dion :duck: Committed by Olivier Dion
Browse files

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
parent 8c8efa4f
No related branches found
No related tags found
No related merge requests found
...@@ -71,14 +71,14 @@ SchedulerTest::schedulerTest() ...@@ -71,14 +71,14 @@ SchedulerTest::schedulerTest()
for (unsigned i=0; i<N; i++) for (unsigned i=0; i<N; i++)
executor.run(task); 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; return taskRun == N;
})); }));
for (unsigned i=0; i<N; i++) for (unsigned i=0; i<N; i++)
executor.scheduleIn(task, std::chrono::microseconds(1)); 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; return taskRun == 2 * N;
})); }));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment