From 0f83dd85ad1113468fa6b23b05dc703a3303bdd6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 27 Feb 2010 17:07:14 +0100 Subject: Autotest: no need to call exitLoop twice, from two threads. This caused the test to be unreliable -- the event loop in the main thread would exit before the thread finished running. Now we're sure that it's only exiting becuase the thread finished running. --- tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp b/tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp index 54426ce..a55a427 100644 --- a/tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp +++ b/tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp @@ -128,8 +128,6 @@ void tst_QDBusPendingCall::finished(QDBusPendingCallWatcher *call) watchArgument = call; if (QThread::currentThread() == thread()) QTestEventLoop::instance().exitLoop(); - else - QMetaObject::invokeMethod(&QTestEventLoop::instance(), "exitLoop", Qt::QueuedConnection); } void tst_QDBusPendingCall::callback(const QStringList &list) @@ -427,7 +425,7 @@ void tst_QDBusPendingCall::watcher_waitForFinished_threaded() } thread(this); QTestEventLoop::instance().connect(&thread, SIGNAL(finished()), SLOT(exitLoop())); thread.start(); - QTestEventLoop::instance().enterLoop(1000); + QTestEventLoop::instance().enterLoop(10); QVERIFY(!thread.isRunning()); QVERIFY(!QTestEventLoop::instance().timeout()); } -- cgit v0.12