From e3da13d1fe9ad623e05aec1977c813e7da37cedd Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 7 Jul 2016 11:46:45 +0200 Subject: Fail quickly if the backend is not available --- examples/imapresource/tests/imapmailtest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'examples/imapresource/tests/imapmailtest.cpp') diff --git a/examples/imapresource/tests/imapmailtest.cpp b/examples/imapresource/tests/imapmailtest.cpp index c94a731..e6f41f4 100644 --- a/examples/imapresource/tests/imapmailtest.cpp +++ b/examples/imapresource/tests/imapmailtest.cpp @@ -1,4 +1,5 @@ #include +#include #include @@ -18,6 +19,13 @@ class ImapMailTest : public Sink::MailTest Q_OBJECT protected: + bool isBackendAvailable() Q_DECL_OVERRIDE + { + QTcpSocket socket; + socket.connectToHost("localhost", 993); + return socket.waitForConnected(200); + } + void resetTestEnvironment() Q_DECL_OVERRIDE { system("resetmailbox.sh"); -- cgit v1.2.3