From b8453b6fe3552cdfe32c726f87bb30d897c679b0 Mon Sep 17 00:00:00 2001 From: Martin Petersson Date: Wed, 11 Jul 2012 12:31:29 +0200 Subject: QtNetwork: Handle FD_CLOSE on Windows We need to handle FD_CLOSE separately on Windows as this will be sent only once. When we get FD_CLOSE we need to check if there is more data available for reading. It there is this might indicate that there is another FD_READ that we need to handle after the FD_CLOSE. So in this case we will manually create another close event. Task-number: QTBUG-19409 Task-number: QTBUG-25386 Change-Id: Ie19906bc3f64fb6a85a508a5ab12caac5d70ccdb Reviewed-by: Shane Kearns --- tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 11 +---------- .../socket/qsocks5socketengine/tst_qsocks5socketengine.cpp | 1 + 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index a7ac2661d5..55fe4f45b4 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -3820,11 +3820,6 @@ void tst_QNetworkReply::ioPutToFileFromSocket() SocketPair socketpair; QTRY_VERIFY(socketpair.create()); //QTRY_VERIFY as a workaround for QTBUG-24451 -#ifdef Q_OS_WIN - //128k and 2M tests regularly fail. Assumed same characteristics as ioPostToHttpFromSocket - if (data.size() > 1000) - QSKIP("unstable on windows - QTBUG-25386"); -#endif socketpair.endPoints[0]->write(data); QNetworkReplyPtr reply(manager.put(QNetworkRequest(url), socketpair.endPoints[1])); socketpair.endPoints[0]->close(); @@ -4110,11 +4105,7 @@ void tst_QNetworkReply::ioPostToHttpFromSocket() QFETCH(QByteArray, data); QFETCH(QUrl, url); QFETCH(QNetworkProxy, proxy); -#ifdef Q_OS_WIN - //QTBUG-25386 hits one of the 128k tests 50% of the time, one of the 4k tests rarely (but at least 1%) - if (data.size() > 1000) - QSKIP("unstable on windows - QTBUG-25386"); -#endif + SocketPair socketpair; QTRY_VERIFY(socketpair.create()); //QTRY_VERIFY as a workaround for QTBUG-24451 diff --git a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp index 461ec55dea..cca4d139c5 100644 --- a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp +++ b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp @@ -108,6 +108,7 @@ protected slots: private: void readNotification() { } void writeNotification() { } + void closeNotification() { } void exceptionNotification() { } void connectionNotification() { } QTcpSocket *tcpSocketNonBlocking_socket; -- cgit v1.2.3