tmf: Fix failure in StandardImportGzipTraceTest related to test ordering
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Mon, 21 Dec 2015 06:52:51 +0000 (01:52 -0500)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Mon, 21 Dec 2015 16:13:25 +0000 (11:13 -0500)
If TmfAlignTimeAxisTest ran before, and the window size was small
enough, it was possible for the test to be running in an "Align 1"
perspective with insufficient height for the events table. Because of
that, the expected content in the table could not be found. The tests in
TmfAlignTimeAxisTest switch to generated perspectives without returning
to a "normal" perspective. It makes sense that the tests "cleanup" by
returning to a more normal perspective like the Tracing perspective.

Also switch to Tracing perspective explicitly in
StandardImportGzipTraceTest which is more consistent with the other
tests and is somewhat less error prone.

Change-Id: I0d28af39266bdcdc81e765b5522c92a4a8085602
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/63081
Reviewed-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ui/swtbot/tests/viewers/events/TmfAlignTimeAxisTest.java
tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ui/swtbot/tests/wizards/StandardImportGzipTraceTest.java

index dd74c15e24d1fb9c70182bf3c6bf6c00b6f61618..d57be3115910c77841c96514d68b7055df093cca 100644 (file)
@@ -146,6 +146,8 @@ public class TmfAlignTimeAxisTest {
     public void after() {
         SWTWorkbenchBot bot = new SWTWorkbenchBot();
         SWTBotUtils.activeEventsEditor(bot).close();
+        /* Switch back to Tracing perspective since several tests change the perspective */
+        SWTBotUtils.switchToTracingPerspective();
     }
 
     /**
index 8d5dabc909db81480ca5a44d753c6974df54d87f..6dfb8e982c89a4c4976033302512157b59fd3131 100644 (file)
@@ -118,6 +118,7 @@ public class StandardImportGzipTraceTest {
         fBot = new SWTWorkbenchBot();
         /* Close welcome view */
         SWTBotUtils.closeView("Welcome", fBot);
+        SWTBotUtils.switchToTracingPerspective();
 
         SWTBotUtils.createProject(PROJECT_NAME);
     }
This page took 0.025502 seconds and 5 git commands to generate.