[autotests] Try making TestWaylandSurface::testDisconnect more robust
On build.kde.org the Surface is often already destroyed when returning from waiting on client disconnected. This change tries to handle the situation better: only if the signal is not yet emitted, try to wait for it.
This commit is contained in:
parent
a092de25b4
commit
233e388e02
1 changed files with 3 additions and 1 deletions
|
@ -945,7 +945,9 @@ void TestWaylandSurface::testDisconnect()
|
|||
}
|
||||
QVERIFY(clientDisconnectedSpy.wait());
|
||||
QCOMPARE(clientDisconnectedSpy.count(), 1);
|
||||
QCOMPARE(surfaceDestroyedSpy.count(), 0);
|
||||
if (surfaceDestroyedSpy.isEmpty()) {
|
||||
QVERIFY(surfaceDestroyedSpy.wait());
|
||||
}
|
||||
QTRY_COMPARE(surfaceDestroyedSpy.count(), 1);
|
||||
|
||||
s->destroy();
|
||||
|
|
Loading…
Reference in a new issue