mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Improve testdatabase performance
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "config-keepassx-tests.h"
|
#include "config-keepassx-tests.h"
|
||||||
#include "core/Metadata.h"
|
#include "core/Metadata.h"
|
||||||
|
#include "core/Tools.h"
|
||||||
#include "crypto/Crypto.h"
|
#include "crypto/Crypto.h"
|
||||||
#include "format/KeePass2Writer.h"
|
#include "format/KeePass2Writer.h"
|
||||||
#include "keys/PasswordKey.h"
|
#include "keys/PasswordKey.h"
|
||||||
@@ -118,6 +119,9 @@ void TestDatabase::testSignals()
|
|||||||
QVERIFY(db->save(&error));
|
QVERIFY(db->save(&error));
|
||||||
QCOMPARE(spySaved.count(), 1);
|
QCOMPARE(spySaved.count(), 1);
|
||||||
|
|
||||||
|
// Short delay to allow file system settling to reduce test failures
|
||||||
|
Tools::wait(100);
|
||||||
|
|
||||||
QSignalSpy spyFileChanged(db.data(), SIGNAL(databaseFileChanged()));
|
QSignalSpy spyFileChanged(db.data(), SIGNAL(databaseFileChanged()));
|
||||||
QVERIFY(tempFile.copyFromFile(dbFileName));
|
QVERIFY(tempFile.copyFromFile(dbFileName));
|
||||||
QTRY_COMPARE(spyFileChanged.count(), 1);
|
QTRY_COMPARE(spyFileChanged.count(), 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user