tst_QMimeDatabase: increase timeout
The runUpdateMimeDatabase() call was timing out on the CI due to running out of the default 30s timeout for QProcess::waitForFinished() (on my machine, that call takes less than 0.5s, reliably...). Increase to two minutes. Change-Id: I61b2e060ea9c2508b853847ba7040ad499e0084c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
parent
6c4d75a485
commit
1cbf402ea6
@ -858,6 +858,11 @@ void tst_QMimeDatabase::fromThreads()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_PROCESS
|
#ifndef QT_NO_PROCESS
|
||||||
|
|
||||||
|
enum {
|
||||||
|
UpdateMimeDatabaseTimeout = 120 * 1000 // 2min
|
||||||
|
};
|
||||||
|
|
||||||
static bool runUpdateMimeDatabase(const QString &path) // TODO make it a QMimeDatabase method?
|
static bool runUpdateMimeDatabase(const QString &path) // TODO make it a QMimeDatabase method?
|
||||||
{
|
{
|
||||||
const QString umdCommand = QString::fromLatin1("update-mime-database");
|
const QString umdCommand = QString::fromLatin1("update-mime-database");
|
||||||
@ -878,7 +883,7 @@ static bool runUpdateMimeDatabase(const QString &path) // TODO make it a QMimeDa
|
|||||||
qPrintable(umd), qPrintable(proc.errorString()));
|
qPrintable(umd), qPrintable(proc.errorString()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const bool success = proc.waitForFinished();
|
const bool success = proc.waitForFinished(UpdateMimeDatabaseTimeout);
|
||||||
qDebug().noquote() << "runUpdateMimeDatabase: done,"
|
qDebug().noquote() << "runUpdateMimeDatabase: done,"
|
||||||
<< success << timer.elapsed() << "ms";
|
<< success << timer.elapsed() << "ms";
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user