┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2018-10-13 11:15:09 +0200
committerElvis Angelaccio <[email protected]>2018-10-13 11:18:46 +0200
commitc9dd3478be21bc8a4bbd6102b1d66997df180d5f (patch)
treecc8deb8be69cba9006e3c5ac5ab93242151a8a3f /src
parent009cecfe88ce8560f8e63359547c036c73d25a7e (diff)
[PlacesItemModelTest] Try to double test timeout
The randomly failing `testRefresh()` on the CI can be reproduced by replacing the QTRY_COMPARE with a simple QCOMPARE. So it seems the CI can be slow such that the default QTR_COMPARE timeout of 5 seconds is not enough. If a timeout of 10 seconds fixes this particular test case, we can use this bigger timeout also in the other failing tests.
Diffstat (limited to 'src')
-rw-r--r--src/tests/placesitemmodeltest.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tests/placesitemmodeltest.cpp b/src/tests/placesitemmodeltest.cpp
index 40ee47cbc..c05ce6882 100644
--- a/src/tests/placesitemmodeltest.cpp
+++ b/src/tests/placesitemmodeltest.cpp
@@ -43,6 +43,11 @@ Q_DECLARE_METATYPE(KItemRange)
#define KDE_ROOT_PATH "/"
#endif
+namespace
+{
+ constexpr int TIMEOUT = 10000;
+}
+
static QString bookmarksFile()
{
return QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/user-places.xbel";
@@ -738,7 +743,7 @@ void PlacesItemModelTest::testRefresh()
m_model->refresh();
// item must be equal
- QTRY_COMPARE(item->text(), sameItem->text());
+ QTRY_COMPARE_WITH_TIMEOUT(item->text(), sameItem->text(), TIMEOUT);
}
void PlacesItemModelTest::testIcons_data()