summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-02-21 14:24:27 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-02-21 14:24:27 +0100
commitee7def182008da0b22d53c2bfc8809c398412058 (patch)
treef5c4683a0523a31d0c76bb8a7030eb9eb031f51c
parent09482914993a8d06277c3604c0ac34026e782674 (diff)
downloadsink-ee7def182008da0b22d53c2bfc8809c398412058.tar.gz
sink-ee7def182008da0b22d53c2bfc8809c398412058.zip
Avoid getting stuck in the hostname lookup during tests.
-rw-r--r--examples/imapresource/tests/imapmailsynctest.cpp3
-rw-r--r--examples/imapresource/tests/imapserverproxytest.cpp3
2 files changed, 4 insertions, 2 deletions
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:
64 Sink::ApplicationDomain::SinkResource createFaultyResource() Q_DECL_OVERRIDE 64 Sink::ApplicationDomain::SinkResource createFaultyResource() Q_DECL_OVERRIDE
65 { 65 {
66 auto resource = ApplicationDomain::ImapResource::create("account1"); 66 auto resource = ApplicationDomain::ImapResource::create("account1");
67 resource.setProperty("server", "foobar"); 67 //Using a bogus ip instead of a bogus hostname avoids getting stuck in the hostname lookup
68 resource.setProperty("server", "111.111.1.1");
68 resource.setProperty("port", 993); 69 resource.setProperty("port", 993);
69 resource.setProperty("username", "doe"); 70 resource.setProperty("username", "doe");
70 resource.setProperty("password", "doe"); 71 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:
51 51
52 void testLoginFailure() 52 void testLoginFailure()
53 { 53 {
54 ImapServerProxy imap("foobar", 993); 54 //Using a bogus ip instead of a bogus hostname avoids getting stuck in the hostname lookup
55 ImapServerProxy imap("111.111.1.1", 993);
55 VERIFYEXEC_FAIL(imap.login("doe", "doe")); 56 VERIFYEXEC_FAIL(imap.login("doe", "doe"));
56 } 57 }
57 58