summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp')
-rw-r--r--tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp
index ff26d5d2c3..e08ed2b3fc 100644
--- a/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp
+++ b/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -205,9 +205,7 @@ void tst_QThreadPool::runTask()
QThreadPool manager;
ran = false;
manager.start(new TestTask());
- // Hang if task is not runned.
- while (ran == false)
- QTest::qSleep(100); // no busy loop - this doesn't work with FIFO schedulers
+ QTRY_VERIFY(ran);
}
/*
@@ -217,8 +215,7 @@ void tst_QThreadPool::singleton()
{
ran = false;
QThreadPool::globalInstance()->start(new TestTask());
- while (ran == false)
- QTest::qSleep(100); // no busy loop - this doesn't work with FIFO schedulers
+ QTRY_VERIFY(ran);
}
int *value = 0;