summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/mimetypes
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-02-14 14:51:47 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-02-14 13:51:12 +0000
commit1cbf402ea67f78411444427f33787b1df376468b (patch)
treef081d008d6fdedd68609197ffd6ff8cdba130057 /tests/auto/corelib/mimetypes
parent6c4d75a485904e1b06964aea953479c167b507e8 (diff)
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>
Diffstat (limited to 'tests/auto/corelib/mimetypes')
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
index 2cf9ea4913..8058d3c897 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
@@ -858,6 +858,11 @@ void tst_QMimeDatabase::fromThreads()
}
#ifndef QT_NO_PROCESS
+
+enum {
+ UpdateMimeDatabaseTimeout = 120 * 1000 // 2min
+};
+
static bool runUpdateMimeDatabase(const QString &path) // TODO make it a QMimeDatabase method?
{
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()));
return false;
}
- const bool success = proc.waitForFinished();
+ const bool success = proc.waitForFinished(UpdateMimeDatabaseTimeout);
qDebug().noquote() << "runUpdateMimeDatabase: done,"
<< success << timer.elapsed() << "ms";
return true;