diff options
author | Jonathan White <support@dmapps.us> | 2021-06-11 06:17:49 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2021-06-12 05:01:19 +0300 |
commit | 4bdc2539f9fea0f9ac2f15d82eb8bba111f0bc04 (patch) | |
tree | 522695f2efe780a5da9756729a5a4293be251b59 /tests | |
parent | 6422fe5ca5354c99906fde406dff1e28d911bf28 (diff) |
Improve testdatabase performance
Diffstat (limited to 'tests')
-rw-r--r-- | tests/TestDatabase.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/TestDatabase.cpp b/tests/TestDatabase.cpp index c3a3a8c42..8ec4a1bd7 100644 --- a/tests/TestDatabase.cpp +++ b/tests/TestDatabase.cpp @@ -23,6 +23,7 @@ #include "config-keepassx-tests.h" #include "core/Metadata.h" +#include "core/Tools.h" #include "crypto/Crypto.h" #include "format/KeePass2Writer.h" #include "keys/PasswordKey.h" @@ -118,6 +119,9 @@ void TestDatabase::testSignals() QVERIFY(db->save(&error)); QCOMPARE(spySaved.count(), 1); + // Short delay to allow file system settling to reduce test failures + Tools::wait(100); + QSignalSpy spyFileChanged(db.data(), SIGNAL(databaseFileChanged())); QVERIFY(tempFile.copyFromFile(dbFileName)); QTRY_COMPARE(spyFileChanged.count(), 1); |