From e4930c0c410d6aa0c38e8bb0887f1d1a4ffa9b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 31 Oct 2016 08:55:54 +0100 Subject: [PATCH] [autotest] Make SlidingPopupsTest a little bit more robust The first test case was sometimes failing due to the time value in the first render pass being too high. So that the effect ended directly for the window. This change adds a small waiting time for the compositor to render prior to the creation of the window. Ideally we would connect to frameRendered signal, but the OpenGL compositor doesn't emit it yet. --- autotests/integration/effects/slidingpopups_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autotests/integration/effects/slidingpopups_test.cpp b/autotests/integration/effects/slidingpopups_test.cpp index 5652183c4c..3437a6a3b1 100644 --- a/autotests/integration/effects/slidingpopups_test.cpp +++ b/autotests/integration/effects/slidingpopups_test.cpp @@ -170,6 +170,10 @@ void SlidingPopupsTest::testWithOtherEffect() QVERIFY(!slidingPoupus->isActive()); QVERIFY(!otherEffect->isActive()); + + // give the compositor some time to render + QTest::qWait(50); + QSignalSpy windowAddedSpy(effects, &EffectsHandler::windowAdded); QVERIFY(windowAddedSpy.isValid());