Use QTRY_VERIFY() to fail after a reasonable timeout rather than putting
the test into an infinite loop.
Change-Id: Ie0917556e15999a94cc0587f3f4c11c0d743a228
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
QThreadPool manager;
ran = false;
manager.start(new TestTask());
- // Hang if task is not runned.
- while (ran == false)
- QTest::qSleep(100); // no busy loop - this doesn't work with FIFO schedulers
+ QTRY_VERIFY(ran);
}
/*
{
ran = false;
QThreadPool::globalInstance()->start(new TestTask());
- while (ran == false)
- QTest::qSleep(100); // no busy loop - this doesn't work with FIFO schedulers
+ QTRY_VERIFY(ran);
}
int *value = 0;