From ee7def182008da0b22d53c2bfc8809c398412058 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 21 Feb 2017 14:24:27 +0100 Subject: Avoid getting stuck in the hostname lookup during tests. --- examples/imapresource/tests/imapmailsynctest.cpp | 3 ++- examples/imapresource/tests/imapserverproxytest.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/imapresource/tests') diff --git a/examples/imapresource/tests/imapmailsynctest.cpp b/examples/imapresource/tests/imapmailsynctest.cpp index f908412..7cdb103 100644 --- a/examples/imapresource/tests/imapmailsynctest.cpp +++ b/examples/imapresource/tests/imapmailsynctest.cpp @@ -64,7 +64,8 @@ protected: Sink::ApplicationDomain::SinkResource createFaultyResource() Q_DECL_OVERRIDE { auto resource = ApplicationDomain::ImapResource::create("account1"); - resource.setProperty("server", "foobar"); + //Using a bogus ip instead of a bogus hostname avoids getting stuck in the hostname lookup + resource.setProperty("server", "111.111.1.1"); resource.setProperty("port", 993); resource.setProperty("username", "doe"); resource.setProperty("password", "doe"); diff --git a/examples/imapresource/tests/imapserverproxytest.cpp b/examples/imapresource/tests/imapserverproxytest.cpp index ec5df49..476066d 100644 --- a/examples/imapresource/tests/imapserverproxytest.cpp +++ b/examples/imapresource/tests/imapserverproxytest.cpp @@ -51,7 +51,8 @@ private slots: void testLoginFailure() { - ImapServerProxy imap("foobar", 993); + //Using a bogus ip instead of a bogus hostname avoids getting stuck in the hostname lookup + ImapServerProxy imap("111.111.1.1", 993); VERIFYEXEC_FAIL(imap.login("doe", "doe")); } -- cgit v1.2.3