diff options
Diffstat (limited to 'tests/auto/network')
-rw-r--r-- | tests/auto/network/access/qnetworkreply/BLACKLIST | 2 | ||||
-rw-r--r-- | tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST index 4f356a8596..f9c977a51b 100644 --- a/tests/auto/network/access/qnetworkreply/BLACKLIST +++ b/tests/auto/network/access/qnetworkreply/BLACKLIST @@ -11,8 +11,6 @@ osx linux [getFromHttpIntoBuffer] osx -[getFromHttpIntoBuffer2] -windows-10 [headFromHttp] windows-10 msvc-2017 [ioPostToHttpFromSocket] diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index fb64eedc58..2485b6f3ac 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -6897,13 +6897,8 @@ public: // bytesAvailable must never be 0 QVERIFY(bytesAvailable != 0); - if (bytesAvailableList.length() < 5) { - // We assume that the first few times the bytes available must be less than the complete size, e.g. - // the bytesAvailable() function works correctly in case of a downloadBuffer. - QVERIFY(bytesAvailable < uploadSize); - } if (!bytesAvailableList.isEmpty()) { - // Also check that the same bytesAvailable is not coming twice in a row + // Check that the same bytesAvailable is not coming twice in a row QVERIFY(bytesAvailableList.last() != bytesAvailable); } @@ -6915,6 +6910,12 @@ public: { // We should have already received all readyRead QVERIFY(!bytesAvailableList.isEmpty()); + for (int i = 0; i < std::min(int(bytesAvailableList.size() - 1), 5); ++i) { + // We assume that, at least, the first time the bytes available must be less than the + // complete size, e.g. the bytesAvailable() function works correctly in case of a + // downloadBuffer. + QVERIFY(bytesAvailableList.at(i) < uploadSize); + } QCOMPARE(bytesAvailableList.last(), uploadSize); } }; |