Make test pass on machines with many cores
Just starting 20 threads to test this won't cut it if the machine you're testing on has an ideal thread count of 16 or larger. Change-Id: Icba8f00aa836fec6da41c71b318e9e17bdd47c0e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
3d7d8346dd
commit
bbc19bd979
@ -799,7 +799,7 @@ void tst_QThreadPool::tryStartPeakThreadCount()
|
||||
CounterTask task;
|
||||
QThreadPool threadPool;
|
||||
|
||||
for (int i = 0; i < 20; ++i) {
|
||||
for (int i = 0; i < 4*QThread::idealThreadCount(); ++i) {
|
||||
if (threadPool.tryStart(&task) == false)
|
||||
QTest::qWait(10);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user