From 5d04c27a272ab1c0ccc4bfd40f075e1cb7cfd8a2 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 21 Dec 2021 20:34:44 +0100 Subject: [PATCH] Stabilize tst_QGraphicsProxyWidget::scrollUpdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test waits a bit hoping that all paint events are delivered after showing the widget so that we can count the rectangles that are getting updated when scrolling. Waiting for 20ms is too short unless the system is completely idle. Based on testing on a local VM, 150ms produces reliable results. Pick-to: 6.2 6.3 Change-Id: I7729e94eae41476be67291a2f664cff784f96c7d Reviewed-by: Tor Arne Vestbø --- .../qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 896a7e02de..cd4a30c9bf 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -1355,7 +1355,7 @@ void tst_QGraphicsProxyWidget::scrollUpdate() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); QTRY_VERIFY(view.npaints >= 1); - QTest::qWait(20); + QTest::qWait(150); widget->paintEventRegion = QRegion(); widget->npaints = 0; view.paintEventRegion = QRegion();