QWidget: extend timeouts in flaky enterLeaveOnWindowShowHide test

That test has a very flaky history on Windows 11, presumably because
there are even more fade-in/out effects. Wait longer for those to
finish.

Fixes: QTBUG-102239
Pick-to: 6.4 6.3 6.2
Change-Id: I1d59f4422469e60a8c4dc5a52c48f0344e954491
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Volker Hilsheimer 2022-07-11 22:13:32 +02:00
parent 16641f625e
commit 2738a80acd

View File

@ -10234,7 +10234,7 @@ void tst_QWidget::enterLeaveOnWindowShowHide()
if (!QTest::qWaitForWindowExposed(secondary))
QEXPECT_FAIL("", "Secondary window failed to show, test will fail", Abort);
if (secondaryWindowType == Qt::Dialog && QGuiApplication::platformName() == "windows")
QTest::qWait(250); // on Windows, we have to wait for fade-in effects
QTest::qWait(1000); // on Windows, we have to wait for fade-in effects
}
};
@ -10255,7 +10255,7 @@ void tst_QWidget::enterLeaveOnWindowShowHide()
QVERIFY(QTest::qWaitForWindowActive(&widget));
++expectedEnter;
QTRY_COMPARE_WITH_TIMEOUT(widget.numEnterEvents, expectedEnter, 250);
QTRY_COMPARE_WITH_TIMEOUT(widget.numEnterEvents, expectedEnter, 1000);
QCOMPARE(widget.enterPosition, widget.mapFromGlobal(cursorPos));
QVERIFY(widget.underMouse());