summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhttpnetworkconnection
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qhttpnetworkconnection')
-rw-r--r--tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro2
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp15
2 files changed, 10 insertions, 7 deletions
diff --git a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
index 3283873..e19d962 100644
--- a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
+++ b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
@@ -2,4 +2,6 @@ load(qttest_p4)
SOURCES += tst_qhttpnetworkconnection.cpp
INCLUDEPATH += $$(QTDIR)/src/3rdparty/zlib
+requires(contains(QT_CONFIG,private_tests))
+
QT = core network
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index 9fe59c9..a29a292 100644
--- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -252,8 +252,8 @@ void tst_QHttpNetworkConnection::get()
QByteArray ba;
do {
QCoreApplication::instance()->processEvents();
- if (reply->bytesAvailable())
- ba += reply->read();
+ while (reply->bytesAvailable())
+ ba += reply->readAny();
if (stopWatch.elapsed() >= 30000)
break;
} while (!reply->isFinished());
@@ -335,7 +335,8 @@ void tst_QHttpNetworkConnection::put()
if (reply->isFinished()) {
QByteArray ba;
- ba += reply->read();
+ while (reply->bytesAvailable())
+ ba += reply->readAny();
} else if(finishedWithErrorCalled) {
if(!succeed) {
delete reply;
@@ -434,8 +435,8 @@ void tst_QHttpNetworkConnection::post()
QByteArray ba;
do {
QCoreApplication::instance()->processEvents();
- if (reply->bytesAvailable())
- ba += reply->read();
+ while (reply->bytesAvailable())
+ ba += reply->readAny();
if (stopWatch.elapsed() >= 30000)
break;
} while (!reply->isFinished());
@@ -634,8 +635,8 @@ void tst_QHttpNetworkConnection::compression()
QByteArray ba;
do {
QCoreApplication::instance()->processEvents();
- if (reply->bytesAvailable())
- ba += reply->read();
+ while (reply->bytesAvailable())
+ ba += reply->readAny();
if (stopWatch.elapsed() >= 30000)
break;
} while (!reply->isFinished());