From d579192b4943c40b4ef4c20ccb7e72e733a5b670 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sat, 21 Dec 2019 21:42:42 +0100 Subject: [PATCH] stabilize test --- tests/auto/timemanager/testtimemanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/timemanager/testtimemanager.cpp b/tests/auto/timemanager/testtimemanager.cpp index 55c5fcf9..f30886dd 100644 --- a/tests/auto/timemanager/testtimemanager.cpp +++ b/tests/auto/timemanager/testtimemanager.cpp @@ -2171,7 +2171,9 @@ void TestTimeManager::triggerMockEvent1() QCOMPARE(spy.count(), 1); reply->deleteLater(); - eventSpy.wait(200); + if (eventSpy.isEmpty()) { + eventSpy.wait(); + } QVariantList eventTriggerVariants = checkNotifications(eventSpy, "Events.EventTriggered"); QVERIFY2(eventTriggerVariants.count() == 1, "Did not get Events.EventTriggered notification."); QVERIFY2(eventTriggerVariants.first().toMap().value("params").toMap().contains("event"), "Notification Events.EventTriggered does not contain event.");