Stabilize tst_QSignalSpy::waitFunctionPointer_signalEmittedTooLate()
Replace qWait()/QCOMPARE() by QTRY_COMPARE(). Change-Id: Ic5233e2f26e6663a3fbcbb2edb09a517feef4564 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This commit is contained in:
parent
8b6838347d
commit
ff1630ab0e
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user