diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-04 10:31:41 +0200 |
---|---|---|
committer | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2021-09-18 15:59:27 +0200 |
commit | 0d6bbe6978714431f18aa6f797ffb978d054e002 (patch) | |
tree | f1ab68894b89b9f089c3b243420711c6cb3fc8cd /tests | |
parent | 130af94631e9610fd640a84043a92e4ba8fcec8f (diff) |
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>
(cherry picked from commit bbc19bd9795ad873d4ff7c8f793aaff554c6b3eb)
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp index cd245030db..bf313c27ef 100644 --- a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp +++ b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp @@ -803,7 +803,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); } |