Improve reliability of v4 debugger tests
authorSimon Hausmann <simon.hausmann@digia.com>
Tue, 13 Aug 2013 10:00:39 +0000 (12:00 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 15 Aug 2013 09:52:22 +0000 (11:52 +0200)
Sometimes the test hangs on shutdown. Don't wait for the finished signal to be
emitted with an event loop, instead do the QThread equivalent of pthread_join:
wait().

Change-Id: I3583e8366c08fc0446682d124d86df4ffa3290d3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
tests/auto/qml/qv4debugger/tst_qv4debugger.cpp

index c6ecd19..7d8f02a 100644 (file)
@@ -176,7 +176,7 @@ void tst_qv4debugger::init()
 void tst_qv4debugger::cleanup()
 {
     m_javaScriptThread->exit();
-    waitForSignal(m_javaScriptThread, SIGNAL(finished()), /*timeout*/ 0);
+    m_javaScriptThread->wait();
     delete m_engine;
     delete m_javaScriptThread;
     m_engine = 0;