summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-10 22:05:20 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-10 23:05:23 +0100
commitee025760cf7040d2864327c9bd478f7d0792a79f (patch)
tree5f4f7415d83adbd30a39d836af2d6f5ad67c641d /tests/auto/widgets
parentd04e117d3dd0e35d2e5dc4f636346389faf80348 (diff)
Use QTRY_COMPARE in an attempt to make the test less flaky
The test function only runs on X11, and this might help with the asynchronous nature of the client/server architecture, also for drag'n'drop. Change-Id: I38db9104e304e57c36f84932d13f8dfae7452883 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index 161f7f648d..0f3671708d 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -2699,12 +2699,12 @@ void tst_QListView::internalDragDropMove()
list.startDrag(Qt::MoveAction);
- QCOMPARE(data.stringList(), expectedData);
+ QTRY_COMPARE(data.stringList(), expectedData);
// if the model doesn't implement moveRows, or if items are replaced, then selection is lost
if (modelMoves && !(itemFlags & Qt::ItemIsDropEnabled)) {
const QStringList actualSelected = getSelectedTexts();
- QCOMPARE(actualSelected, expectedSelected);
+ QTRY_COMPARE(actualSelected, expectedSelected);
}
}