diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-11-10 22:05:20 +0100 |
---|---|---|
committer | David Redondo <qt@david-redondo.de> | 2020-11-19 23:16:42 +0100 |
commit | 834e30c397cd62adefa1c72333e0b24be6acd3ee (patch) | |
tree | 0c4fda5584a4d7b6238051923b96460334bca46c /tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp | |
parent | 83189474ad1cb07174e60fe2f27780067378dfa8 (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>
(cherry picked from commit ee025760cf7040d2864327c9bd478f7d0792a79f)
Diffstat (limited to 'tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp')
-rw-r--r-- | tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp | 4 |
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 941ff52373..04c6acfea1 100644 --- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp +++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp @@ -2707,12 +2707,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); } } |