diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2015-04-17 14:17:26 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2015-08-20 07:09:45 +0000 |
commit | f3898fe2cc3fe1ab96b4f0274a3252720b74c835 (patch) | |
tree | c671c0b9fb383a3b0b2d3051c55cbe229cf2449a | |
parent | 120867ba7b052fdf05977e80019915222f5e1138 (diff) |
tst_qnetworkreply::ioGetFromBuiltinHttp - fix blacklisted test (OS X)
This test fails on OS X: we first fill sockets' kernel buffers and then
we tryto write a 'residue', waiting in 'select' for 2 seconds.
It looks like on OS X (at least, 10.10) 2 seconds are not enough - we always have a timeout.
Wait ... 4 seconds.
Change-Id: Id679dccda10b8f7859b8dfa6456b91ec13d52f68
Reviewed-by: Richard J. Moore <rich@kde.org>
-rw-r--r-- | tests/auto/network/access/qnetworkreply/BLACKLIST | 2 | ||||
-rw-r--r-- | tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST index 7c9b8db3c3..5012b356c2 100644 --- a/tests/auto/network/access/qnetworkreply/BLACKLIST +++ b/tests/auto/network/access/qnetworkreply/BLACKLIST @@ -1,9 +1,7 @@ osx [ioGetFromBuiltinHttp:http+limited] -osx ubuntu-14.04 [ioGetFromBuiltinHttp:https+limited] -osx ubuntu-14.04 [ioGetFromHttpBrokenServer:no-newline] osx diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 4d41d4beb1..b448a1db12 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -1078,7 +1078,11 @@ protected: // clean up QAbstractSocket's residue: while (client->bytesToWrite() > 0) { qDebug() << "Still having" << client->bytesToWrite() << "bytes to write, doing that now"; +#ifdef Q_OS_OSX + if (!client->waitForBytesWritten(4000)) { +#else if (!client->waitForBytesWritten(2000)) { +#endif qDebug() << "ERROR: FastSender:" << client->error() << "cleaning up residue"; return; } @@ -1098,7 +1102,11 @@ protected: measuredSentBytes += writeNextData(client, bytesToWrite); while (client->bytesToWrite() > 0) { +#ifdef Q_OS_OSX + if (!client->waitForBytesWritten(4000)) { +#else if (!client->waitForBytesWritten(2000)) { +#endif qDebug() << "ERROR: FastSender:" << client->error() << "during blocking write"; return; } |