From 855a878bcc124f8949586b3656dcc6e545e18dc0 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 2 Jun 2016 13:35:40 +0200 Subject: Always return jobs, not futures. Otherwise the calls are not composable. --- examples/imapresource/tests/imapserverproxytest.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'examples/imapresource/tests/imapserverproxytest.cpp') diff --git a/examples/imapresource/tests/imapserverproxytest.cpp b/examples/imapresource/tests/imapserverproxytest.cpp index b30cc33..3761dac 100644 --- a/examples/imapresource/tests/imapserverproxytest.cpp +++ b/examples/imapresource/tests/imapserverproxytest.cpp @@ -80,18 +80,13 @@ private slots: { ImapServerProxy imap("localhost", 993); VERIFYEXEC(imap.login("doe", "doe")); - auto future = imap.fetchFolders([](const QVector &){}); - future.waitForFinished(); - QVERIFY(!future.errorCode()); + VERIFYEXEC(imap.fetchFolders([](const QVector &){})); } void testFetchFoldersFailure() { ImapServerProxy imap("foobar", 993); - auto future = imap.fetchFolders([](const QVector &){}); - auto future2 = future; - future2.waitForFinished(); - QVERIFY(future2.errorCode()); + VERIFYEXEC_FAIL(imap.fetchFolders([](const QVector &){})); } void testFetchMail() -- cgit v1.2.3