[autotests/integration] Try hardening destroyWaylandConnection
Destroying the connection is threaded. Only wait if the signal was not already caught.
This commit is contained in:
parent
a902ba8ea3
commit
23bfa05f46
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue