diff options
| author | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2024-09-19 13:01:34 +0200 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-09-20 01:29:13 +0000 |
| commit | 3a3c21a60afd1058215ab413b7dd4565922fa6aa (patch) | |
| tree | bbac509bcee2c9938312aa8a0805bad25dc39412 | |
| parent | 8e5eb9b6edfb5e404f57dbb0a41bb958b4103a8a (diff) | |
Fix flaky test case in the quick table view
The test case added as part of the sha
2cfffb708808ba49148ba4f30c7c8841e5dfb2d9 can be flaky. The validation
for the scheduled polish seems to be causing this issue. Its because the
view is polished even before we verify for scheduled polish. Remove that
existing validation and make sure the table view loads the required rows
with the timeout.
Amends patch 2cfffb708808ba49148ba4f30c7c8841e5dfb2d9.
Pick-to: 6.5
Change-Id: I9a8c5874bf982bc6245cb1ca531fe4399d38b13a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 42e657812e63089c049b4ec00c4f76cca7ce4321)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8e9b3e1cd8e1b7f3cc37bf6fe79ff24d41e877de)
| -rw-r--r-- | tests/auto/quick/qquicktableview/tst_qquicktableview.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp index 3e5a95667d..afc2ffeb37 100644 --- a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp +++ b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp @@ -7702,10 +7702,9 @@ void tst_QQuickTableView::invalidateTableInstanceModelContextObject() auto tableView = window->property("tableView").value<QQuickTableView *>(); QVERIFY(tableView); - WAIT_UNTIL_POLISHED; const int modelData = window->property("modelData").toInt(); - QCOMPARE(tableView->rows(), modelData); + QTRY_COMPARE(tableView->rows(), modelData); bool tableViewDestroyed = false; connect(tableView, &QObject::destroyed, [&] { |
