tmf: Fix intermittent failure in ProjectExplorerTraceActionsTest
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Wed, 29 Jun 2016 20:19:27 +0000 (16:19 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Thu, 14 Jul 2016 17:04:47 +0000 (13:04 -0400)
commite9a570ab1c7b11d9633b618d9d2f0aeea7c6c957
treebd75e1f5bc9a0c8e496a2cacc64040d4003003ab
parent1c9b6343d7d3e72643d34f6cad400a4698824230
tmf: Fix intermittent failure in ProjectExplorerTraceActionsTest

To reproduce the issue:

In TmfTraceElement.delete, add a Thread.sleep(5000); right after the
syncExec that calls closeEditors.

Run ProjectExplorerTraceActionsTest.test4_05Delete then
test4_09BringToTop (you can create a new test method and call them in
that order).

The problem is that the delete test waits until the delete dialog and
the editor are closed but there is no guarantee that the file will
actually be deleted right away. While the file is still there, it is
possible that the next test will start and begin the process of
opening the same existing trace. But then the file gets deleted and
the trace doesn't validate properly (or other exceptions depending on
the timing of when the trace gets deleted).

We should make sure that the file is deleted before proceeding.

Bug: 497035
Change-Id: I33d0b45732bdde6061112736f2f1f7e46d55864e
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/76249
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.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ui/swtbot/tests/projectexplorer/ProjectExplorerTraceActionsTest.java
This page took 0.025712 seconds and 5 git commands to generate.