summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-02-27 16:07:14 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-02-27 16:07:14 (GMT)
commit0f83dd85ad1113468fa6b23b05dc703a3303bdd6 (patch)
treec14f6c86223a3135ffd551717132a600e219086b /tests/auto
parent3f626c3e14f2fe5fdecc38d4265d74f8315b3490 (diff)
downloadQt-0f83dd85ad1113468fa6b23b05dc703a3303bdd6.zip
Qt-0f83dd85ad1113468fa6b23b05dc703a3303bdd6.tar.gz
Qt-0f83dd85ad1113468fa6b23b05dc703a3303bdd6.tar.bz2
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.
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp4
1 files changed, 1 insertions, 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());
}