mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-26 15:59:50 -05:00
Improve testdatabase performance
This commit is contained in:
parent
25a34a66e1
commit
a0912b057e
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user