From 39b3b6c7ff99f18e8719b28d748ec63adf76808d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 10 Apr 2017 16:11:45 +0200 Subject: Don't continue processing the pipeline until we have appended the message. Otherwise the processor might think its done before it actually is. --- examples/mailtransportresource/tests/mailtransporttest.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/mailtransportresource/tests') diff --git a/examples/mailtransportresource/tests/mailtransporttest.cpp b/examples/mailtransportresource/tests/mailtransporttest.cpp index 3b848b3..23a61b8 100644 --- a/examples/mailtransportresource/tests/mailtransporttest.cpp +++ b/examples/mailtransportresource/tests/mailtransporttest.cpp @@ -58,6 +58,7 @@ private slots: void testSendMail() { auto message = KMime::Message::Ptr::create(); + message->messageID(true)->generate("foo.com"); message->subject(true)->fromUnicodeString(QString::fromLatin1("Foobar"), "utf8"); message->assemble(); @@ -67,9 +68,10 @@ private slots: VERIFYEXEC(Store::create(mail)); VERIFYEXEC(ResourceControl::flushMessageQueue(QByteArrayList() << mResourceInstanceIdentifier)); + //FIXME the email is sent already because changereplay kicks of automatically //Ensure the mail is queryable in the outbox - auto mailInOutbox = Store::readOne(Query().resourceFilter(mResourceInstanceIdentifier).filter(false).request().request().request().request()); - QVERIFY(!mailInOutbox.identifier().isEmpty()); + // auto mailInOutbox = Store::readOne(Query().resourceFilter(mResourceInstanceIdentifier).filter(false).request().request().request().request()); + // QVERIFY(!mailInOutbox.identifier().isEmpty()); //Ensure the mail is sent and moved to the sent mail folder on sync VERIFYEXEC(Store::synchronize(Query().resourceFilter(mResourceInstanceIdentifier))); -- cgit v1.2.3