From a773a60c694bd3e112b33d6ce300d419ad56ccc2 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 11 Jan 2015 20:56:32 +0100 Subject: Error handling for remove. --- tests/storagetest.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/storagetest.cpp b/tests/storagetest.cpp index a771042..a405de0 100644 --- a/tests/storagetest.cpp +++ b/tests/storagetest.cpp @@ -120,6 +120,19 @@ private Q_SLOTS: storage.removeFromDisk(); } + void testTurnReadToWrite() + { + populate(3); + Akonadi2::Storage store(testDataPath, dbName, Akonadi2::Storage::ReadWrite); + store.scan("key1", [&](void *keyValue, int keySize, void *dataValue, int dataSize) -> bool { + store.remove(keyValue, keySize, [](const Akonadi2::Storage::Error &) { + QVERIFY(false); + }); + return false; + }); + store.removeFromDisk(); + } + void testConcurrentRead() { const int count = 10000; -- cgit v1.2.3