From f9e0e8a980b8f237115e69a8da7d382164be0ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 13 Aug 2017 17:08:49 +0200 Subject: [PATCH] [autotests] Try making KWinBindingsTest::testSwitchWindowScript more robust Another random failure on build.kde.org (see T6546). This tries to use QTRY_COMPARE on the SignalSpy's count instead of a wait in the hope that this can handle the multi-threaded situation better. Though it might also be possible that the other thread just didn't run in the 5 sec we waited. --- autotests/integration/kwinbindings_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autotests/integration/kwinbindings_test.cpp b/autotests/integration/kwinbindings_test.cpp index f6a854d7a8..499b1140e8 100644 --- a/autotests/integration/kwinbindings_test.cpp +++ b/autotests/integration/kwinbindings_test.cpp @@ -186,7 +186,7 @@ void KWinBindingsTest::testSwitchWindowScript() QSignalSpy runningChangedSpy(s, &AbstractScript::runningChanged); QVERIFY(runningChangedSpy.isValid()); s->run(); - QVERIFY(runningChangedSpy.wait()); + QTRY_COMPARE(runningChangedSpy.count(), 1); }; runScript(QStringLiteral("slotSwitchWindowUp"));