Stabilize qguieventloop test.
The test assumed that an event loop can be tested for emptiness multiple times, which is wrong because an event can be delivered any time. Change-Id: Ic44245321eeed2091b640ada2c83d205b83a1cc2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>bb10
parent
493d08aeea
commit
a153bb232c
|
|
@ -207,22 +207,11 @@ void tst_QEventLoop::processEvents()
|
|||
QCOMPARE(awakeSpy.count(), 1);
|
||||
|
||||
// allow any session manager to complete its handshake, so that
|
||||
// there are no pending events left.
|
||||
// there are no pending events left. This tests that we are able
|
||||
// to process all events from the queue, otherwise it will hang.
|
||||
while (eventLoop.processEvents())
|
||||
;
|
||||
|
||||
// On mac we get application started events at this point,
|
||||
// so process events one more time just to be sure.
|
||||
eventLoop.processEvents();
|
||||
|
||||
// no events to process, QEventLoop::processEvents() should return
|
||||
// false
|
||||
aboutToBlockSpy.clear();
|
||||
awakeSpy.clear();
|
||||
QVERIFY(!eventLoop.processEvents());
|
||||
QCOMPARE(aboutToBlockSpy.count(), 0);
|
||||
QCOMPARE(awakeSpy.count(), 1);
|
||||
|
||||
// make sure the test doesn't block forever
|
||||
int timerId = startTimer(100);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
[processEvents]
|
||||
ubuntu-14.04
|
||||
Loading…
Reference in New Issue