[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.
This commit is contained in:
Martin Gräßlin 2017-08-13 17:08:49 +02:00
parent d0c2c1ed09
commit f9e0e8a980

View file

@ -186,7 +186,7 @@ void KWinBindingsTest::testSwitchWindowScript()
QSignalSpy runningChangedSpy(s, &AbstractScript::runningChanged); QSignalSpy runningChangedSpy(s, &AbstractScript::runningChanged);
QVERIFY(runningChangedSpy.isValid()); QVERIFY(runningChangedSpy.isValid());
s->run(); s->run();
QVERIFY(runningChangedSpy.wait()); QTRY_COMPARE(runningChangedSpy.count(), 1);
}; };
runScript(QStringLiteral("slotSwitchWindowUp")); runScript(QStringLiteral("slotSwitchWindowUp"));