Tests: Fix DB locking issue in permissions test
authorChristian Kamm <mail@ckamm.de>
Tue, 7 May 2019 06:25:49 +0000 (08:25 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:50 +0000 (10:58 +0100)
test/testpermissions.cpp

index c7d5da8f4cfa77d4a9ec91958121256a766b04e7..7cab633594bad3df2e0f70b4f3d8dfce117b962f 100644 (file)
@@ -27,6 +27,9 @@ static void applyPermissionsFromName(FileInfo &info) {
 // https://github.com/owncloud/client/issues/2038
 static void assertCsyncJournalOk(SyncJournalDb &journal)
 {
+    // The DB is openend in locked mode: close to allow us to access.
+    journal.close();
+
     SqlDatabase db;
     QVERIFY(db.openReadOnly(journal.databaseFilePath()));
     SqlQuery q("SELECT count(*) from metadata where length(fileId) == 0", db);