From 45f7512bf502cc3fe22c4e7f86bec4a530f7a2f6 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 27 Nov 2015 10:33:19 +0100 Subject: tst_QThreadPool::tryStartCount(): Wait until tasks have finished. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jędrzej Nowacki --- tests/auto/corelib/thread/qthreadpool/BLACKLIST | 3 --- tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'tests') 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); } } -- cgit v1.2.3