diff options
Diffstat (limited to 'tests/pipelinetest.cpp')
-rw-r--r-- | tests/pipelinetest.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/pipelinetest.cpp b/tests/pipelinetest.cpp index 7431deb..5165d35 100644 --- a/tests/pipelinetest.cpp +++ b/tests/pipelinetest.cpp | |||
@@ -20,6 +20,7 @@ | |||
20 | #include "domainadaptor.h" | 20 | #include "domainadaptor.h" |
21 | #include "definitions.h" | 21 | #include "definitions.h" |
22 | #include "adaptorfactoryregistry.h" | 22 | #include "adaptorfactoryregistry.h" |
23 | #include "storage/key.h" | ||
23 | 24 | ||
24 | static void removeFromDisk(const QString &name) | 25 | static void removeFromDisk(const QString &name) |
25 | { | 26 | { |
@@ -430,8 +431,8 @@ private slots: | |||
430 | // Get uid of written entity | 431 | // Get uid of written entity |
431 | auto keys = getKeys(instanceIdentifier(), "event.main"); | 432 | auto keys = getKeys(instanceIdentifier(), "event.main"); |
432 | QCOMPARE(keys.size(), 1); | 433 | QCOMPARE(keys.size(), 1); |
433 | const auto key = keys.first(); | 434 | auto key = Sink::Storage::Key::fromInternalByteArray(keys.first()); |
434 | const auto uid = Sink::Storage::DataStore::uidFromKey(key); | 435 | const auto uid = key.identifier().toDisplayByteArray(); |
435 | 436 | ||
436 | //Simulate local modification | 437 | //Simulate local modification |
437 | { | 438 | { |
@@ -453,8 +454,10 @@ private slots: | |||
453 | pipeline.commit(); | 454 | pipeline.commit(); |
454 | } | 455 | } |
455 | 456 | ||
457 | key.setRevision(3); | ||
458 | |||
456 | // Ensure we've got the new revision with the modification | 459 | // Ensure we've got the new revision with the modification |
457 | auto buffer = getEntity(instanceIdentifier(), "event.main", Sink::Storage::DataStore::assembleKey(uid, 3)); | 460 | auto buffer = getEntity(instanceIdentifier(), "event.main", key.toInternalByteArray()); |
458 | QVERIFY(!buffer.isEmpty()); | 461 | QVERIFY(!buffer.isEmpty()); |
459 | Sink::EntityBuffer entityBuffer(buffer.data(), buffer.size()); | 462 | Sink::EntityBuffer entityBuffer(buffer.data(), buffer.size()); |
460 | auto adaptor = adaptorFactory->createAdaptor(entityBuffer.entity()); | 463 | auto adaptor = adaptorFactory->createAdaptor(entityBuffer.entity()); |