summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDimitrios Apostolou <dimitrios.apostolou@qt.io>2019-06-11 11:17:27 +0200
committerDimitrios Apostolou <dimitrios.apostolou@qt.io>2019-06-11 11:28:17 +0200
commit2c9ba8474681abbd4c9eb87e8030e386b631e921 (patch)
tree9fa53d8fc7d43c00f8a4845df3f0f4f8567c9ae6 /tests
parent067664531853a1e857c777c1cc56fc64b272e021 (diff)
Do not use the resolver for the local hostname
Fix test for systems that do not resolve their hostname to localhost. Not using name resolution also makes the test more robust. Change-Id: I558b9a975b9021536709db87fbf6a3b314f7ca79 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/access/qftp/tst_qftp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp
index 6e18e1a663..1a8f264c28 100644
--- a/tests/auto/network/access/qftp/tst_qftp.cpp
+++ b/tests/auto/network/access/qftp/tst_qftp.cpp
@@ -2342,7 +2342,7 @@ void tst_QFtp::loginURL()
ftp = newFtp();
addCommand(QFtp::ConnectToHost,
- ftp->connectToHost(QHostInfo::localHostName(), port));
+ ftp->connectToHost("127.0.0.1", port));
addCommand(QFtp::Login, ftp->login(user, password));
QTestEventLoop::instance().enterLoop(5);
@@ -2350,7 +2350,7 @@ void tst_QFtp::loginURL()
ftp = nullptr;
server.stopServer();
if (QTestEventLoop::instance().timeout())
- QFAIL(msgTimedOut(QHostInfo::localHostName(), port));
+ QFAIL(msgTimedOut("127.0.0.1", port));
QCOMPARE(server.getRawUser(), rawUser);
QCOMPARE(server.getRawPassword(), rawPass);