Change for QTRY_VERIFY in flaky auto test focusNextOnHide()
Auto test tst_QAbstractItemView::focusNextOnHide() is flaky where QVERIFY(table.hasFocus()) sometimes return false where it should be true. Modify QVERIFY for QTRY_VERIFY to give the necessary time to the XCB thread to proceed. Removes the flakiness when testing on OpenSuse 15.5 Change-Id: I83690e7c851430c040a57713516a5df990a89c32 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
parent
0534a566a7
commit
9d6fdad624
@ -3556,7 +3556,7 @@ void tst_QAbstractItemView::focusNextOnHide()
|
||||
widget.show();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&widget));
|
||||
|
||||
QVERIFY(table.hasFocus());
|
||||
QTRY_VERIFY(table.hasFocus());
|
||||
QCOMPARE(table.currentIndex(), table.model()->index(0, 0));
|
||||
QTest::keyPress(&table, Qt::Key_Tab);
|
||||
QCOMPARE(table.currentIndex(), table.model()->index(0, 1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user