From 494b67d610afd590e476bc5b9e1dd84a569c6372 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 19 Jun 2020 00:06:04 +0100 Subject: [PATCH] [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. --- autotests/integration/quick_tiling_test.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/autotests/integration/quick_tiling_test.cpp b/autotests/integration/quick_tiling_test.cpp index 2cb1c74549..f5f5264325 100644 --- a/autotests/integration/quick_tiling_test.cpp +++ b/autotests/integration/quick_tiling_test.cpp @@ -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