tst_QIODevice::unget() without network: skip only the affected part
Instead of QSKIPing the whole test, ignoring what was already tested Change-Id: Iced928ce1bce92b447c8698a9942973cb78b6c15 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
d063b2b131
commit
50a5ef9945
@ -276,12 +276,15 @@ void tst_QIODevice::unget()
|
||||
lineResult = "ZXCV";
|
||||
} else {
|
||||
#ifdef QT_TEST_SERVER
|
||||
if (!QtNetworkSettings::verifyConnection(QtNetworkSettings::httpServerName(), 80))
|
||||
QSKIP("No network test server available");
|
||||
const bool hasNetworkServer =
|
||||
QtNetworkSettings::verifyConnection(QtNetworkSettings::httpServerName(), 80);
|
||||
#else
|
||||
if (!QtNetworkSettings::verifyTestNetworkSettings())
|
||||
QSKIP("No network test server available");
|
||||
const bool hasNetworkServer = QtNetworkSettings::verifyTestNetworkSettings();
|
||||
#endif
|
||||
if (!hasNetworkServer) {
|
||||
qInfo("No network test server: skipping QTcpSocket part of test.");
|
||||
continue;
|
||||
}
|
||||
socket.connectToHost(QtNetworkSettings::httpServerName(), 80);
|
||||
socket.write("GET / HTTP/1.0\r\n\r\n");
|
||||
QVERIFY(socket.waitForReadyRead());
|
||||
|
Loading…
Reference in New Issue
Block a user