diff options
author | Don Sanders <don.sanders@nokia.com> | 2012-03-12 15:58:23 +0200 |
---|---|---|
committer | Don Sanders <don.sanders@nokia.com> | 2012-03-12 15:58:23 +0200 |
commit | beab306112005ffc2ac55bbc81ae128f9a083f7c (patch) | |
tree | 62dacf5cfd7dbb803fb981ff0faae5a487d91ad0 | |
parent | df7a7372ecf4444caa9557b540479fc3dd7f52a4 (diff) |
Fix problem with async rollback actions unit test.
Would be better to have a more general solution.
-rw-r--r-- | tests/tst_qmailstorageaction/tst_qmailstorageaction.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/tst_qmailstorageaction/tst_qmailstorageaction.cpp b/tests/tst_qmailstorageaction/tst_qmailstorageaction.cpp index c1ad3f79..de238e01 100644 --- a/tests/tst_qmailstorageaction/tst_qmailstorageaction.cpp +++ b/tests/tst_qmailstorageaction/tst_qmailstorageaction.cpp @@ -748,6 +748,12 @@ void tst_QMailStorageAction::test_storageaction_rollBackUpdates() QVERIFY(m.parentFolderId() == trashId2); QVERIFY(m.previousParentFolderId() == inboxId3); } + // It is necessary to flush the ipc nofications so that the messageserver is + // aware of the add and disconnected move, before the async rollback is done. + // Otherwise if this test is run twice in a row, while the messageserver is + // kept running, then the messageserver will have an out of date metadata + // cache item in the mail store. + QMailStore::instance()->flushIpcNotifications(); action.rollBackUpdates(accountId3); int i = 0; |