Stabilize tst_QGraphicsProxyWidget::scrollUpdate

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ø <tor.arne.vestbo@qt.io>
bb10
Volker Hilsheimer 2021-12-21 20:34:44 +01:00
parent 6d4102729f
commit 5d04c27a27
1 changed files with 1 additions and 1 deletions

View File

@ -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();