Skip to content

Commit

Permalink
Extend the default retry times of QtNetworkSettings::verifyConnection
Browse files Browse the repository at this point in the history
Apparently, it is not enough to just retry 10 times (10 seconds) in the
CI network. It happens from time to time that a test fails due to server
port is unreachable. Especially, the docker containers are running in a
virtual machine on Windows and macOS platforms. In such cases, it needs
more time to warm up the service depending on the system loading.

Change-Id: Ia0234bff2a82988b62f451e20b50671708784008
Reviewed-by: Edward Welbourne <[email protected]>
Reviewed-by: Jędrzej Nowacki <[email protected]>
  • Loading branch information
ryanjh committed Jan 23, 2019
1 parent e0dc6dc commit 4552edd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/auto/network-settings.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
Expand Down Expand Up @@ -143,7 +143,7 @@ class QtNetworkSettings
return true;
}

static bool verifyConnection(QString serverName, quint16 port, quint32 retry = 10)
static bool verifyConnection(QString serverName, quint16 port, quint32 retry = 60)
{
QTcpSocket socket;
for (quint32 i = 1; i < retry; i++) {
Expand Down

0 comments on commit 4552edd

Please sign in to comment.