Commit 11483849 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

StoreCompactTest: unbreak test trying to access stale attribute

Collection object owning the attribute went out of life before,
so cache the string of the wanted remoteRevision instead
parent ef17e257
Pipeline #88147 failed with stage
in 25 minutes and 55 seconds
......@@ -257,7 +257,8 @@ void StoreCompactTest::testCompact()
QCOMPARE(collection, collection2);
attribute = collection.attribute<FileStore::EntityCompactChangeAttribute>();
QCOMPARE(attribute->remoteRevision().toInt(), collection2.remoteRevision().toInt() + 1);
const QString remoteRevision = attribute->remoteRevision();
QCOMPARE(remoteRevision.toInt(), collection2.remoteRevision().toInt() + 1);
entryList = mbox2.entries();
......@@ -285,7 +286,7 @@ void StoreCompactTest::testCompact()
collection = collections.first();
QCOMPARE(collection, collection2);
QCOMPARE(collection.remoteRevision(), attribute->remoteRevision());
QCOMPARE(collection.remoteRevision(), remoteRevision);
// test compact after delete from before the end of more than one mbox
Collection collection3;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment