From de860ce15b0921a37c0f3a21dbebe4311b9414a8 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 12 Aug 2015 00:58:28 +0200 Subject: Support for nested transactions --- tests/storagetest.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/storagetest.cpp b/tests/storagetest.cpp index b71a767..55ec888 100644 --- a/tests/storagetest.cpp +++ b/tests/storagetest.cpp @@ -142,6 +142,18 @@ private Q_SLOTS: }); } + void testNestedTransactions() + { + populate(3); + Akonadi2::Storage store(testDataPath, dbName, Akonadi2::Storage::ReadWrite); + store.createTransaction(Akonadi2::Storage::ReadOnly).scan("key1", [&](const QByteArray &key, const QByteArray &value) -> bool { + store.createTransaction(Akonadi2::Storage::ReadWrite).remove(key, [](const Akonadi2::Storage::Error &) { + QVERIFY(false); + }); + return false; + }); + } + void testReadEmptyDb() { bool gotResult = false; -- cgit v1.2.3