summaryrefslogtreecommitdiffstats
path: root/tests/auto/qnetworkreply
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2011-01-12 09:55:25 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2011-02-04 13:18:41 (GMT)
commit6c39dd04b1fea88e0688ef847e185ebb1013471a (patch)
tree549b22ef3a3dac64d9071fd00ecf096247949255 /tests/auto/qnetworkreply
parentba8e5eedf5f40091eb67dd391a7dcaf9299db2f5 (diff)
downloadQt-6c39dd04b1fea88e0688ef847e185ebb1013471a.zip
Qt-6c39dd04b1fea88e0688ef847e185ebb1013471a.tar.gz
Qt-6c39dd04b1fea88e0688ef847e185ebb1013471a.tar.bz2
tst_qnetworkreply: Relax a condition
With the different buffers in Qt and the OS, we relax a condition for now.
Diffstat (limited to 'tests/auto/qnetworkreply')
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 1d2a69f..fd494c6 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -3850,19 +3850,13 @@ void tst_QNetworkReply::ioPostToHttpUploadProgress()
disconnect(&server, SIGNAL(newConnection()), &QTestEventLoop::instance(), SLOT(exitLoop()));
incomingSocket->setReadBufferSize(1*1024);
- QTestEventLoop::instance().enterLoop(2);
+ QTestEventLoop::instance().enterLoop(5);
// some progress should have been made
QList<QVariant> args = spy.last();
QVERIFY(!args.isEmpty());
QVERIFY(args.at(0).toLongLong() > 0);
-
- incomingSocket->setReadBufferSize(32*1024);
- incomingSocket->read(16*1024);
- QTestEventLoop::instance().enterLoop(2);
- // some more progress than before
- QList<QVariant> args2 = spy.last();
- QVERIFY(!args2.isEmpty());
- QVERIFY(args2.at(0).toLongLong() > args.at(0).toLongLong());
+ // but not everything!
+ QVERIFY(args.at(0).toLongLong() != sourceFile.size());
// set the read buffer to unlimited
incomingSocket->setReadBufferSize(0);
@@ -3870,8 +3864,10 @@ void tst_QNetworkReply::ioPostToHttpUploadProgress()
// progress should be finished
QList<QVariant> args3 = spy.last();
QVERIFY(!args3.isEmpty());
- QVERIFY(args3.at(0).toLongLong() > args2.at(0).toLongLong());
+ // More progress than before
+ QVERIFY(args3.at(0).toLongLong() > args.at(0).toLongLong());
QCOMPARE(args3.at(0).toLongLong(), args3.at(1).toLongLong());
+ // And actually finished..
QCOMPARE(args3.at(0).toLongLong(), sourceFile.size());
// after sending this, the QNAM should emit finished()