summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket/qtcpsocket
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-12-03 13:13:20 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2020-12-04 00:17:46 +0100
commit27f52942b422b47a1283d918e0a0bc8761382921 (patch)
tree4e160f55f0064c56f356be9bd3ff463f475669c9 /tests/auto/network/socket/qtcpsocket
parentaf0a9375f3af98573291e78511582bb02a9d4491 (diff)
tst_QTcpSocket: stabilize connectToHostError
It's not _wrong_ to time out when connecting to something unreachable (it's just a different way of handling it) so we shouldn't fail when this happens either. In local testing (windows) it times out after 8 seconds, so bump the timer to 10 seconds. On systems where it's faster there'll be no difference as long as things don't go wrong. Pick-to: 6.0 Fixes: QTBUG-89089 Change-Id: I8437cf8e4fbecedea2391ed87fdce1213085b964 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/network/socket/qtcpsocket')
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index 4ebdaa6851..78b56774aa 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -2126,8 +2126,8 @@ void tst_QTcpSocket::connectToHostError()
});
socket->connectToHost(host, port);
- eventLoop.enterLoopMSecs(7000);
- if (eventLoop.timeout() && port == 65000) {
+ eventLoop.enterLoopMSecs(10'000);
+ if (eventLoop.timeout()) {
// Let's at least verify it's not in connected state:
QVERIFY(socket->state() != QAbstractSocket::ConnectedState);
QSKIP("Connection to unreachable host timed out, skipping the rest of the test");