Unverified Commit f430f573 authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

tests: unify and prolong test timeouts

This should hopefully make the CI happy.
parent 66b885d9
Pipeline #104808 failed
......@@ -3,6 +3,9 @@
#include <QString>
static const unsigned int encryptionTestTimeout = 10000;
static const unsigned int decryptionTestTimeout = 25000;
class KGpgTransaction;
class QTemporaryDir;
......
......@@ -23,7 +23,7 @@ void KGpgDecryptTest::testDecrypt(){
QSignalSpy spy(transaction, &KGpgDecrypt::done);
addPasswordArguments(transaction, passphrase);
transaction->start();
QVERIFY(spy.wait(10000));
QVERIFY(spy.wait(decryptionTestTimeout));
QVERIFY(text.compare(transaction->decryptedText().join(QLatin1Char('\n'))));
}
......
......@@ -47,7 +47,7 @@ void KGpgEncryptTest::testAsciiArmoredEncryption()
[](int result) { QCOMPARE(result, static_cast<int>(KGpgTransaction::TS_OK)); });
QSignalSpy spy(encryption, &KGpgEncrypt::done);
encryption->start();
QVERIFY(spy.wait(10000));
QVERIFY(spy.wait(encryptionTestTimeout));
checkEncryptedText(encryption);
if (QTest::currentTestFailed())
......@@ -61,7 +61,7 @@ void KGpgEncryptTest::testAsciiArmoredEncryption()
QSignalSpy spy2(decryption, &KGpgDecrypt::done);
addPasswordArguments(decryption, passphrase);
decryption->start();
QVERIFY(spy2.wait());
QVERIFY(spy2.wait(decryptionTestTimeout));
//Check if decrypted text is equal to original text
QVERIFY(text.compare(decryption->decryptedText().join(QLatin1Char('\n'))));
......@@ -85,7 +85,7 @@ void KGpgEncryptTest::testHideKeyIdEncryption()
[](int result) { QCOMPARE(result, static_cast<int>(KGpgTransaction::TS_OK)); });
QSignalSpy spy(encryption, &KGpgEncrypt::done);
encryption->start();
QVERIFY(spy.wait(10000));
QVERIFY(spy.wait(encryptionTestTimeout));
checkEncryptedText(encryption);
if (QTest::currentTestFailed())
......@@ -103,7 +103,7 @@ void KGpgEncryptTest::testHideKeyIdEncryption()
QSignalSpy spy2(decryption, &KGpgDecrypt::done);
addPasswordArguments(decryption, passphrase);
decryption->start();
QVERIFY(spy2.wait());
QVERIFY(spy2.wait(decryptionTestTimeout));
//Check if decrypted text is equal to original text
QVERIFY(text.compare(decryption->decryptedText().join(QLatin1Char('\n'))));
......@@ -124,7 +124,7 @@ void KGpgEncryptTest::testSymmetricEncryption()
QSignalSpy spy(encryption, &KGpgEncrypt::done);
addPasswordArguments(encryption, passphrase);
encryption->start();
QVERIFY(spy.wait(10000));
QVERIFY(spy.wait(encryptionTestTimeout));
checkEncryptedText(encryption);
if (QTest::currentTestFailed())
......@@ -138,7 +138,7 @@ void KGpgEncryptTest::testSymmetricEncryption()
QSignalSpy spy2(decryption, &KGpgDecrypt::done);
addPasswordArguments(decryption, passphrase);
decryption->start();
QVERIFY(spy2.wait());
QVERIFY(spy2.wait(decryptionTestTimeout));
//Check if decrypted text is equal to original text
QVERIFY(text.compare(decryption->decryptedText().join(QLatin1Char('\n'))));
......
Markdown is supported
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