Commit 65b7fd68 authored by Martin Flöser's avatar Martin Flöser
Browse files

[autotests] Try to fix the flaky TestWayalndSurface::disconnect

Sometimes the test is failing due to a wait on the signalspy not
working and then the cleanup triggers a heap-use-after-free.

This change tries to address the problem by using a QTRY_COMPARE
instead of a wait on signalspy.
parent 33c8634c
......@@ -939,8 +939,7 @@ void TestWaylandSurface::testDisconnect()
QVERIFY(clientDisconnectedSpy.wait());
QCOMPARE(clientDisconnectedSpy.count(), 1);
QCOMPARE(surfaceDestroyedSpy.count(), 0);
QVERIFY(surfaceDestroyedSpy.wait());
QCOMPARE(surfaceDestroyedSpy.count(), 1);
QTRY_COMPARE(surfaceDestroyedSpy.count(), 1);
s->destroy();
m_shm->destroy();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment