From 23bfa05f46695cc18f5de4ec50add796d3a2651b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 8 Aug 2016 10:10:26 +0200 Subject: [PATCH] [autotests/integration] Try hardening destroyWaylandConnection Destroying the connection is threaded. Only wait if the signal was not already caught. --- autotests/integration/test_helpers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index dcd4327e5c..1bf3d4afd5 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -172,7 +172,9 @@ void destroyWaylandConnection() if (s_waylandConnection.thread) { QSignalSpy spy(s_waylandConnection.connection, &QObject::destroyed); s_waylandConnection.connection->deleteLater(); - QVERIFY(spy.wait()); + if (spy.isEmpty()) { + QVERIFY(spy.wait()); + } s_waylandConnection.thread->quit(); s_waylandConnection.thread->wait(); delete s_waylandConnection.thread;