From 27f52942b422b47a1283d918e0a0bc8761382921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Thu, 3 Dec 2020 13:13:20 +0100 Subject: 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 --- tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/network/socket/qtcpsocket') 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"); -- cgit v1.2.3