Written by marcelpetrick
on October 7, 2019
Set via environment variable QTEST_FUNCTION_TIMEOUT a higher timeout duration.
qputenv sets them temporary for the run of the single test case (put this at the beginning of the test case).
1 2 3 4 5 6 7 |
std::string duration("1200000"); // 1200 seconds -> 20 min QByteArray timeoutDuration(duration.c_str(), static_cast<int>(duration.length())); qputenv("QTEST_FUNCTION_TIMEOUT", timeoutDuration); { // just for checking .. auto result = qgetenv("QTEST_FUNCTION_TIMEOUT"); qDebug() << "timeout set to:" << result << "ms"; } |
nota bene: This block has to be put before qExec is ran, so put it into the constructor of the test-suite!