[autotests] Fix quick tile autotest race condition

We send two async actions via another process
We do a wait for one
We check that we received two events

This is racey. QTRY_COMPARE can allow both events to arrive separately.
This commit is contained in:
David Edmundson 2020-06-19 00:06:04 +01:00 committed by David Edmundson
parent 4a681e3d47
commit 494b67d610

View file

@ -775,8 +775,7 @@ void QuickTilingTest::testShortcut()
QSignalSpy quickTileChangedSpy(c, &AbstractClient::quickTileModeChanged);
QVERIFY(quickTileChangedSpy.isValid());
QVERIFY(quickTileChangedSpy.wait());
QCOMPARE(quickTileChangedSpy.count(), numberOfQuickTileActions);
QTRY_COMPARE(quickTileChangedSpy.count(), numberOfQuickTileActions);
// at this point the geometry did not yet change
QCOMPARE(c->frameGeometry(), QRect(0, 0, 100, 50));
// but quick tile mode already changed