tst_QNetworkReply: fix backgroundRequestInterruption test.

After we have change the policy we should set the readbuffersize to
unlimited again, so that we try to download all data.

Change-Id: I1b9bdb6c2e5f408c920f6e6d7e85a39e4c18316b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This commit is contained in:
Martin Petersson 2012-05-10 18:20:31 +02:00 committed by Qt by Nokia
parent a050bba2f0
commit 85c3f6a74d

View File

@ -6952,6 +6952,9 @@ void tst_QNetworkReply::backgroundRequestInterruption()
QNetworkSessionPrivate::setUsagePolicies(*const_cast<QNetworkSession *>(session.data()), QNetworkSession::NoBackgroundTrafficPolicy);
// After we have changed the policy we can download at full speed.
reply->setReadBufferSize(0);
QVERIFY(waitForFinish(reply) != Timeout);
if (session)
QNetworkSessionPrivate::setUsagePolicies(*const_cast<QNetworkSession *>(session.data()), original);