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>bb10
parent
120867ba7b
commit
f3898fe2cc
|
|
@ -1,9 +1,7 @@
|
|||
osx
|
||||
[ioGetFromBuiltinHttp:http+limited]
|
||||
osx
|
||||
ubuntu-14.04
|
||||
[ioGetFromBuiltinHttp:https+limited]
|
||||
osx
|
||||
ubuntu-14.04
|
||||
[ioGetFromHttpBrokenServer:no-newline]
|
||||
osx
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue