From ff1630ab0e1d4bf80580a3cc1852ac4450351133 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 14 Mar 2018 15:46:03 +0100 Subject: [PATCH] Stabilize tst_QSignalSpy::waitFunctionPointer_signalEmittedTooLate() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace qWait()/QCOMPARE() by QTRY_COMPARE(). Change-Id: Ic5233e2f26e6663a3fbcbb2edb09a517feef4564 Reviewed-by: Sami Nurmenniemi Reviewed-by: Shawn Rutledge Reviewed-by: Jędrzej Nowacki --- tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp b/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp index 3aef916c38..df241c030e 100644 --- a/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp +++ b/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp @@ -259,8 +259,7 @@ void tst_QSignalSpy::wait_signalEmittedTooLate() QTimer::singleShot(500, this, SIGNAL(sigFoo())); QSignalSpy spy(this, SIGNAL(sigFoo())); QVERIFY(!spy.wait(200)); - QTest::qWait(400); - QCOMPARE(spy.count(), 1); + QTRY_COMPARE(spy.count(), 1); } void tst_QSignalSpy::wait_signalEmittedMultipleTimes()