summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-11-27 10:33:19 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-11-27 10:58:24 +0000
commit45f7512bf502cc3fe22c4e7f86bec4a530f7a2f6 (patch)
tree188ac17aa6aae6f2b3019bd412e077f617d98655
parent28beaf63cdb90e0424bcf1bf851179f822397894 (diff)
tst_QThreadPool::tryStartCount(): Wait until tasks have finished.
Replace hardcoded interval by QTRY_COMPARE() ensuring that all tasks have finished, since otherwise QThreadPool::tryStart() fails in the next run. Remove blacklisting for MSVC2012 since it is not compiler-specific. Task-number: QTBUG-49654 Change-Id: If49b6eb9ef4da4ba2911839166c397d84c175e00 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
-rw-r--r--tests/auto/corelib/thread/qthreadpool/BLACKLIST3
-rw-r--r--tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp2
2 files changed, 1 insertions, 4 deletions
diff --git a/tests/auto/corelib/thread/qthreadpool/BLACKLIST b/tests/auto/corelib/thread/qthreadpool/BLACKLIST
index 684f650a72..1c392ce96c 100644
--- a/tests/auto/corelib/thread/qthreadpool/BLACKLIST
+++ b/tests/auto/corelib/thread/qthreadpool/BLACKLIST
@@ -1,5 +1,2 @@
[expiryTimeoutRace]
osx
-[tryStartCount]
-windows msvc-2012
-linux
diff --git a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
index c9fdb4b718..c465a07487 100644
--- a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
+++ b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
@@ -821,7 +821,7 @@ void tst_QThreadPool::tryStartCount()
++count;
QCOMPARE(count, QThread::idealThreadCount());
- QTest::qWait(100);
+ QTRY_COMPARE(threadPool.activeThreadCount(), 0);
}
}