[Development] Help needed in 4.8 failing tests on Mac (QGraphicsProxyWidget and MacNativeEvents)
Andreas Aardal Hanssen
andreas at hanssen.name
Sat Dec 29 15:28:54 CET 2012
On Dec 29, 2012, at 3:10 PM, Thiago Macieira <thiago.macieira at intel.com> wrote:
> The following two tests have prevented 3 of the last 6 integration in 4.8, and
> that's 3 of 3 of the integrations that failed on Mac:
>
> These are consistent failures: they failed in 6 out of 6 runs:
> FAIL! : tst_QGraphicsProxyWidget::hoverEnterLeaveEvent(widget, no hover)
> FAIL! : tst_QGraphicsProxyWidget::hoverEnterLeaveEvent(widget, hover)
These tests can all be rewritten - they do not need to rely on the rather flaky[*] behavior of QWidget's events. Fixing them means sending the expected events directly to the scene, instead of waiting for the view to send them. This simplifies the tests and makes them 100% reliable but it sort of requires there to be tests for QWidget that do test that these events are delivered under more stable/reliable conditions.
I'm all for making this simplification, it can also simplify and stabilise other similar graphics view test cases. It narrows the scope of the tests but that may not be a problem.
Andreas
[*] The flakiness isn't visible to the user, typically it's caused by relying on windows being activated exactly once, and is also sensitive to the initial position of the mouse cursor when a widget is initially shown (as if the widget is already under the cursor when opened, the HoverEnter event may have been received before the test expected it to, and so on).
More information about the Development
mailing list