summaryrefslogtreecommitdiffstats
path: root/tests/genericresourcetest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-08-16 12:45:17 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-08-18 18:48:06 +0200
commit726a49431909dbd8bdc6efdb8a36ddf4214a7328 (patch)
tree48103c645dac6aaa0f4eba6cea89ab347333329d /tests/genericresourcetest.cpp
parentc7f813895866981ef97c99ed52d2d2a80dc13178 (diff)
downloadsink-726a49431909dbd8bdc6efdb8a36ddf4214a7328.tar.gz
sink-726a49431909dbd8bdc6efdb8a36ddf4214a7328.zip
Batch dequeue in messagequeue.
The messagequeue removes all dequeued values once all values have been processed in a single transaction.
Diffstat (limited to 'tests/genericresourcetest.cpp')
-rw-r--r--tests/genericresourcetest.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/genericresourcetest.cpp b/tests/genericresourcetest.cpp
index 0faa484..abac7a6 100644
--- a/tests/genericresourcetest.cpp
+++ b/tests/genericresourcetest.cpp
@@ -87,14 +87,12 @@ private Q_SLOTS:
87 //Actual test 87 //Actual test
88 auto pipeline = QSharedPointer<Akonadi2::Pipeline>::create("org.kde.test.instance1"); 88 auto pipeline = QSharedPointer<Akonadi2::Pipeline>::create("org.kde.test.instance1");
89 QSignalSpy revisionSpy(pipeline.data(), SIGNAL(revisionUpdated(qint64))); 89 QSignalSpy revisionSpy(pipeline.data(), SIGNAL(revisionUpdated(qint64)));
90 QVERIFY(revisionSpy.isValid());
90 TestResource resource("org.kde.test.instance1", pipeline); 91 TestResource resource("org.kde.test.instance1", pipeline);
91 resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command); 92 resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command);
92 resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command); 93 resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command);
93 94 resource.processAllMessages().exec().waitForFinished();
94 QVERIFY(revisionSpy.isValid()); 95 QCOMPARE(revisionSpy.last().at(0).toInt(), 2);
95 QTRY_COMPARE(revisionSpy.count(), 2);
96 QTest::qWait(100);
97 QCOMPARE(revisionSpy.count(), 2);
98 } 96 }
99}; 97};
100 98