summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index 0405896ca7..aee243d880 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -988,9 +988,7 @@ void tst_QThread::exitAndStart()
connect(&sync2, SIGNAL(propChanged(int)), &sync1, SLOT(setProp(int)), Qt::QueuedConnection);
connect(&sync1, SIGNAL(propChanged(int)), &thread, SLOT(quit()), Qt::QueuedConnection);
QMetaObject::invokeMethod(&sync2, "setProp", Qt::QueuedConnection , Q_ARG(int, 89));
- QTest::qWait(50);
- while(!thread.wait(10))
- QTest::qWait(10);
+ QTRY_VERIFY(thread.wait(10));
QCOMPARE(sync2.m_prop, 89);
QCOMPARE(sync1.m_prop, 89);
}
@@ -1026,9 +1024,7 @@ void tst_QThread::exitAndExec()
connect(&sync2, SIGNAL(propChanged(int)), &sync1, SLOT(setProp(int)), Qt::QueuedConnection);
connect(&sync1, SIGNAL(propChanged(int)), &thread, SLOT(quit()), Qt::QueuedConnection);
QMetaObject::invokeMethod(&sync2, "setProp", Qt::QueuedConnection , Q_ARG(int, 89));
- QTest::qWait(50);
- while(!thread.wait(10))
- QTest::qWait(10);
+ QTRY_VERIFY(thread.wait(10));
QCOMPARE(sync2.m_prop, 89);
QCOMPARE(sync1.m_prop, 89);
}