summaryrefslogtreecommitdiffstats
path: root/tests/dummyresourcetest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-01-25 11:23:08 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-01-25 11:23:08 +0100
commit3fc8ce958fc244e64a3a3a92f3b1440aae04133b (patch)
tree4ba2b3ca3ee6a17e7f3e7ce67d6ca934626cad7a /tests/dummyresourcetest.cpp
parent9b744da32e64d8a6cd342faba8fc3232884d60f2 (diff)
downloadsink-3fc8ce958fc244e64a3a3a92f3b1440aae04133b.tar.gz
sink-3fc8ce958fc244e64a3a3a92f3b1440aae04133b.zip
A way to ensure all messages have been processed.
As queries become reactive this should become less important. We can then just wait until all results become available. For tests it is in either case useful though.
Diffstat (limited to 'tests/dummyresourcetest.cpp')
-rw-r--r--tests/dummyresourcetest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp
index 4e9d0a5..5508452 100644
--- a/tests/dummyresourcetest.cpp
+++ b/tests/dummyresourcetest.cpp
@@ -108,12 +108,10 @@ private Q_SLOTS:
108 event.setProperty("summary", "summaryValue"); 108 event.setProperty("summary", "summaryValue");
109 Akonadi2::Store::create<Akonadi2::Domain::Event>(event, "org.kde.dummy"); 109 Akonadi2::Store::create<Akonadi2::Domain::Event>(event, "org.kde.dummy");
110 110
111 //TODO required to ensure all messages have been processed. The query should ensure this.
112 QTest::qWait(300);
113
114 Akonadi2::Query query; 111 Akonadi2::Query query;
115 query.resources << "org.kde.dummy"; 112 query.resources << "org.kde.dummy";
116 query.syncOnDemand = false; 113 query.syncOnDemand = false;
114 query.processAll = false;
117 115
118 query.propertyFilter.insert("uid", "testuid"); 116 query.propertyFilter.insert("uid", "testuid");
119 async::SyncListResult<Akonadi2::Domain::Event::Ptr> result(Akonadi2::Store::load<Akonadi2::Domain::Event>(query)); 117 async::SyncListResult<Akonadi2::Domain::Event::Ptr> result(Akonadi2::Store::load<Akonadi2::Domain::Event>(query));
@@ -141,6 +139,8 @@ private Q_SLOTS:
141 { 139 {
142 Akonadi2::Query query; 140 Akonadi2::Query query;
143 query.resources << "org.kde.dummy"; 141 query.resources << "org.kde.dummy";
142 query.syncOnDemand = true;
143 query.processAll = true;
144 144
145 async::SyncListResult<Akonadi2::Domain::Event::Ptr> result(Akonadi2::Store::load<Akonadi2::Domain::Event>(query)); 145 async::SyncListResult<Akonadi2::Domain::Event::Ptr> result(Akonadi2::Store::load<Akonadi2::Domain::Event>(query));
146 result.exec(); 146 result.exec();