diff options
author | Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> | 2015-09-21 13:49:45 +0200 |
---|---|---|
committer | Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> | 2015-09-24 07:36:25 +0000 |
commit | a153bb232ce29fbb9c6b3c0afc2eaf6b54a23785 (patch) | |
tree | f1f25a095d943acdef9ab29699c686c9ad8e97e0 /tests | |
parent | 493d08aeeac4fc808cb4e5daef6368b396ff99ca (diff) |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp | 15 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qguieventloop/BLACKLIST | 2 |
2 files changed, 2 insertions, 15 deletions
diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp index f555d2e58e..c8bb4cda6e 100644 --- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp +++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp @@ -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); diff --git a/tests/auto/gui/kernel/qguieventloop/BLACKLIST b/tests/auto/gui/kernel/qguieventloop/BLACKLIST deleted file mode 100644 index 688df0192b..0000000000 --- a/tests/auto/gui/kernel/qguieventloop/BLACKLIST +++ /dev/null @@ -1,2 +0,0 @@ -[processEvents] -ubuntu-14.04 |