Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
4.8.0
-
None
Description
As part of QTBUG-15019, tst_qeventloop was upgraded with the diff below. The test of the effectiveness of the QEventLoop::ExcludeSocketNotifiers flag is extended to a 200ms run of QEventLoop::exec(), rather than just a single run of QCoreApplication::processEvents().
This is passing on Windows, Mac, normal Linux and Symbian. But CI is reporting a failure on qws/linux-x86-g++. The test itself looks valid, so I suspect a qws event loop bug.
Unfortunately I have not been able to reproduce this myself. I believe I have a qws build under test. For the moment, I am XFAILing the test for qws.
diff --git a/tests/auto/qeventloop/tst_qeventloop.cpp b/tests/auto/qeventloop/tst_qeventloop.cpp
index b31f8cd..9196a47 100644
— a/tests/auto/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/qeventloop/tst_qeventloop.cpp
@@ -602,10 +602,12 @@ public slots:
QTcpSocket *serverSocket = server->nextPendingConnection();
serverSocket->write(data, size);
serverSocket->flush();
- QTest::qSleep(200); //allow the TCP/IP stack time to loopback the data, so our socket is ready to read
- QCoreApplication::processEvents(QEventLoop::ExcludeSocketNotifiers);
+ QEventLoop loop;
+ QTimer::singleShot(200, &loop, SLOT(quit())); //allow the TCP/IP stack time to loopback the data, so our socket is ready to read
+ loop.exec(QEventLoop::ExcludeSocketNotifiers);
testResult = dataArrived; - QCoreApplication::processEvents(); //check the deferred event is processed
+ QTimer::singleShot(200, &loop, SLOT(quit()));
+ loop.exec(); //check the deferred event is processed
serverSocket->close();
QThread::currentThread()->exit(0);
}
Attachments
For Gerrit Dashboard: QTBUG-19699 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
31379,1 | tests: Re-enable tst_QEventLoop test. | 4.8 | qt/qt | Status: ABANDONED | +2 | 0 |