lttng: Help stabilize some TimeGraphs tests
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Thu, 18 Feb 2016 05:48:58 +0000 (00:48 -0500)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Fri, 4 Mar 2016 14:29:55 +0000 (09:29 -0500)
commitf149d124fd171582343d98e2982b136a93d32d1e
tree449c1d2f22e07a88871773765ebf3b400b0207ee
parentfa74050c5feaefdcdb3353511f7130feef964a68
lttng: Help stabilize some TimeGraphs tests

When opening the filter dialog for the Control Flow view, it is possible
that view is not populated yet. When this is the case, the controls in
the dialog are disabled.

To fix this, the test now waits until the "timegraphview is ready".
But it was not sufficient to simply call the existing condition. The
isDirty method of AbstractTimeGraphView does not cover the case where
the view is completely empty and nothing has been scheduled to be drawn
yet (Zoom Thread).

To help with this, the isDirty method was improved to cover more cases.
The time range of the time graph control has to match the window time,
which covers the case that the zoom thread has not started but the view
is about to update itself. There was also a race between the time that
the time range is set on the time graph control and the time that the
zoom thread is created; this was addressed by using the dirty counter to
guard this section.

As a future improvement, the filter dialog could be augmented to handle
the Control Flow view being updated while the dialog is up. This is
beyond the scope of stabilizing the test.

To reproduce this failure before the patch, insert a Thread.sleep(5000)
in ControlFlowView.buildEventList, in the while loop. This will delay
the entry list being built, which will increase the duration of the view
being completely empty and not considered dirty yet.

Change-Id: I94038436608f6e1b384b0f90a43bddd08d3651c6
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/66785
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Hudson CI
lttng/org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/kernel/ui/swtbot/tests/ControlFlowViewSortingTest.java
lttng/org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/kernel/ui/swtbot/tests/ControlFlowViewTest.java
tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/shared/org/eclipse/tracecompass/tmf/ui/swtbot/tests/shared/ConditionHelpers.java
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java
This page took 0.026114 seconds and 5 git commands to generate.