Change for QTRY_VERIFY2 in manual test largerThanScreen_QTBUG30142
Auto test tst_QWidget::largerThanScreen_QTBUG30142 is flaky, where the value of widget.frameGeometry().y() is sometimes -28, when it should be >= 0. This value is always right before qWaitForWindowExposed() is called. Replace QVERIFY2 with QTRY_VERIFY2 this gives the XCB thread enough time to proceed and the test is not flaky anymore. Change-Id: Idef5485938fb122a780006c51779caef3617ad02 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
parent
a41c860c7d
commit
96b9c4c317
@ -12902,14 +12902,14 @@ void tst_QWidget::largerThanScreen_QTBUG30142()
|
||||
widget.resize(200, 4000);
|
||||
widget.show();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&widget));
|
||||
QVERIFY2(widget.frameGeometry().y() >= 0,
|
||||
QTRY_VERIFY2(widget.frameGeometry().y() >= 0,
|
||||
msgComparisonFailed(widget.frameGeometry().y(), " >=", 0));
|
||||
|
||||
QWidget widget2;
|
||||
widget2.resize(10000, 400);
|
||||
widget2.show();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&widget2));
|
||||
QVERIFY2(widget2.frameGeometry().x() >= 0,
|
||||
QTRY_VERIFY2(widget2.frameGeometry().x() >= 0,
|
||||
msgComparisonFailed(widget.frameGeometry().x(), " >=", 0));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user