summaryrefslogtreecommitdiffstats
path: root/tests/auto/concurrent
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@nokia.com>2012-09-06 12:47:50 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-07 15:39:31 +0200
commit72ea9e1e9484a442e40d936403d3cf85c000fd81 (patch)
tree421dcf8237fd564478ea630ac4482f669d1b349e /tests/auto/concurrent
parentf9b9a71c99f53680142a656dba4ced717106bc16 (diff)
Test: Replace QSKIP by XFAIL
For tst_QtConcurrentThreadEngine::threadCount Change-Id: I14b904a26900a01d5d04245ad60d9752f5645e68 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Diffstat (limited to 'tests/auto/concurrent')
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp b/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
index 9722887c7d..f120fc22be 100644
--- a/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
+++ b/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
@@ -278,26 +278,40 @@ public:
void tst_QtConcurrentThreadEngine::threadCount()
{
- QSKIP("QTBUG-23333: This test is unstable");
+ //QTBUG-23333: This test is unstable
const int repeats = 10;
for (int i = 0; i < repeats; ++i) {
ThreadCountUser t;
t.startBlocking();
- QCOMPARE(threads.count(), QThreadPool::globalInstance()->maxThreadCount() + 1); // +1 for the main thread.
+ int count = threads.count();
+ int count_expected = QThreadPool::globalInstance()->maxThreadCount() + 1; // +1 for the main thread.
+ if (count != count_expected)
+ QEXPECT_FAIL("", "QTBUG-23333", Abort);
+ QCOMPARE(count, count_expected);
(new ThreadCountUser())->startAsynchronously().waitForFinished();
- QCOMPARE(threads.count(), QThreadPool::globalInstance()->maxThreadCount());
+ count = threads.count();
+ count_expected = QThreadPool::globalInstance()->maxThreadCount();
+ if (count != count_expected)
+ QEXPECT_FAIL("", "QTBUG-23333", Abort);
+ QCOMPARE(count, count_expected);
}
// Set the finish flag immediately, this should give us one thread only.
for (int i = 0; i < repeats; ++i) {
ThreadCountUser t(true /*finishImmediately*/);
t.startBlocking();
- QCOMPARE(threads.count(), 1);
+ int count = threads.count();
+ if (count != 1)
+ QEXPECT_FAIL("", "QTBUG-23333", Abort);
+ QCOMPARE(count, 1);
(new ThreadCountUser(true /*finishImmediately*/))->startAsynchronously().waitForFinished();
- QCOMPARE(threads.count(), 1);
+ count = threads.count();
+ if (count != 1)
+ QEXPECT_FAIL("", "QTBUG-23333", Abort);
+ QCOMPARE(count, 1);
}
}