Fix QNetworkReply ioGetFromHttpWithCache test case
authorShane Kearns <ext-shane.2.kearns@nokia.com>
Mon, 5 Mar 2012 14:09:04 +0000 (14:09 +0000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 6 Mar 2012 17:24:01 +0000 (18:24 +0100)
commit299e7ffd6a8a91f1d4259b91d4a519c1933c5f33
tree9f4d177085ae8d82b652df63d3c099365bf88af8
parent2cf8e487a5c546382daaa954c23d3926668b0a85
Fix QNetworkReply ioGetFromHttpWithCache test case

Expiration date is calculated from max-age header when a response is
inserted into the cache. Because the test case is prepopulating the
cache outside of QNAM's control, the expiration date was uninitialised,
causing the test to fail.

This is due to a 2 year old change in QNAM, where max age calculation was
removed from cache retrieval, and more recent changes to QDateTime
where secsTo() returns 0 if one of the arguments is invalid.

Change-Id: Ieecd46123dde4ca0fd0be3ae79e70e1528ec02bc
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp