From 2c9ba8474681abbd4c9eb87e8030e386b631e921 Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Tue, 11 Jun 2019 11:17:27 +0200 Subject: 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 --- tests/auto/network/access/qftp/tst_qftp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/network/access/qftp') 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); -- cgit v1.2.1