tests: Increase timeouts, use timeout factor everywhere

This commit is contained in:
Martchus 2018-08-05 15:20:21 +02:00
parent 73c44591d5
commit 7e2eea8523
2 changed files with 3 additions and 3 deletions

View File

@ -489,7 +489,7 @@ void ConnectionTests::testRequestingLog()
// timeout after 1 second
QTimer timeout;
timeout.setSingleShot(true);
timeout.setInterval(1000);
timeout.setInterval(SYNCTHINGTESTHELPER_TIMEOUT(5000));
QEventLoop loop;
QObject::connect(&timeout, &QTimer::timeout, &loop, &QEventLoop::quit);
@ -515,7 +515,7 @@ void ConnectionTests::testRequestingQrCode()
// timeout after 2 seconds
QTimer timeout;
timeout.setSingleShot(true);
timeout.setInterval(2000);
timeout.setInterval(SYNCTHINGTESTHELPER_TIMEOUT(5000));
QEventLoop loop;
QObject::connect(&timeout, &QTimer::timeout, &loop, &QEventLoop::quit);

View File

@ -17,7 +17,7 @@
#include <ostream>
#ifndef SYNCTHINGTESTHELPER_FOR_CLI
#define SYNCTHINGTESTHELPER_TIMEOUT(timeout) static_cast<int>(timeout * timeoutFactor)
#define SYNCTHINGTESTHELPER_TIMEOUT(timeout) static_cast<int>(timeout * ::TestUtilities::timeoutFactor)
#else
#define SYNCTHINGTESTHELPER_TIMEOUT(timeout) timeout
#endif