tmf: Fix PatternScatterChartViewTest intermittent failure
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Fri, 22 Jul 2016 21:41:07 +0000 (17:41 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Mon, 25 Jul 2016 19:54:19 +0000 (15:54 -0400)
commit1b9a8a8c4c2fcbb7470c59117feba0d2366c5cff
tree689e46fa76bc0d90b57b486318c4603c5df118ea
parent75a2c4b33173eb0c27ff1c5b2257894f686b6b98
tmf: Fix PatternScatterChartViewTest intermittent failure

It is possible that the test tries to open the scatter chart view
before it's actually available under the Project Explorer. This is
because the trace hasn't fully opened and the analysis outputs haven't
been determined yet.

To reproduce the issue, go to TmfOpenTraceHelper.openTraceFromElement
and add Thread.sleep(5000) right before the asyncExec call. The test
should fail with:
WidgetNotFoundException:Could not find node with text: Latency vs Time

The fix is to wait until tree nodes are available in the tree before
proceeding. The tree util methods have been augmented to handle using
a tree item as the root to find other items from. It will also now
wait before children items are present before expanding, this is to
cover the case where children are not yet created.

Change-Id: Ib9070b20effb8e409d69f70513500ea5ff478778
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/77800
Reviewed-by: Hudson CI
Reviewed-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
Tested-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.analysis.xml.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/analysis/xml/ui/swtbot/tests/latency/PatternLatencyViewTestBase.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.swtbot.tests/shared/org/eclipse/tracecompass/tmf/ui/swtbot/tests/shared/SWTBotUtils.java
This page took 0.024549 seconds and 5 git commands to generate.