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
This page took 0.026114 seconds and 5 git commands to generate.