[autotest] Try making IdleTest more robust

It started to fail on build.kde.org with a segfault. While I cannot
reproduce this locally it looks like client objects survive to the next
test and thus cause issues.

This change attempts to reduce the risk by making sure that everything
is cleaned up correctly. If that fixes the issue we can look into a
proper fix.
This commit is contained in:
Martin Gräßlin 2016-08-22 15:32:02 +02:00
parent 618bebb63b
commit 31a434b633

View file

@ -152,6 +152,10 @@ void IdleTest::testTimeout()
QVERIFY(resumedFormIdleSpy.isEmpty());
m_seatInterface->setTimestamp(1);
QVERIFY(resumedFormIdleSpy.wait());
timeout.reset();
m_connection->flush();
m_display->dispatchEvents();
}
void IdleTest::testSimulateUserActivity()
@ -176,6 +180,10 @@ void IdleTest::testSimulateUserActivity()
QVERIFY(resumedFormIdleSpy.isEmpty());
timeout->simulateUserActivity();
QVERIFY(resumedFormIdleSpy.wait());
timeout.reset();
m_connection->flush();
m_display->dispatchEvents();
}
QTEST_GUILESS_MAIN(IdleTest)