diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-01-11 20:56:32 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-01-11 20:56:32 +0100 |
commit | a773a60c694bd3e112b33d6ce300d419ad56ccc2 (patch) | |
tree | 8d1c73714531cc494b6636143c0bd770f59cee67 /tests/storagetest.cpp | |
parent | 091412c472b10ca61ada445c19bf3c95cd4e8e40 (diff) | |
download | sink-a773a60c694bd3e112b33d6ce300d419ad56ccc2.tar.gz sink-a773a60c694bd3e112b33d6ce300d419ad56ccc2.zip |
Error handling for remove.
Diffstat (limited to 'tests/storagetest.cpp')
-rw-r--r-- | tests/storagetest.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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: | |||
120 | storage.removeFromDisk(); | 120 | storage.removeFromDisk(); |
121 | } | 121 | } |
122 | 122 | ||
123 | void testTurnReadToWrite() | ||
124 | { | ||
125 | populate(3); | ||
126 | Akonadi2::Storage store(testDataPath, dbName, Akonadi2::Storage::ReadWrite); | ||
127 | store.scan("key1", [&](void *keyValue, int keySize, void *dataValue, int dataSize) -> bool { | ||
128 | store.remove(keyValue, keySize, [](const Akonadi2::Storage::Error &) { | ||
129 | QVERIFY(false); | ||
130 | }); | ||
131 | return false; | ||
132 | }); | ||
133 | store.removeFromDisk(); | ||
134 | } | ||
135 | |||
123 | void testConcurrentRead() | 136 | void testConcurrentRead() |
124 | { | 137 | { |
125 | const int count = 10000; | 138 | const int count = 10000; |