Improved GUI refresh and JUnit tests
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui.tests / src / org / eclipse / linuxtools / lttng2 / ui / tests / control / model / component / TraceControlKernelSessionTests.java
index 92ac65a133662a27564aac7698be98c7312312bb..0ff1d56641b126ef307dbbce40fcb24d603a4a6e 100644 (file)
@@ -112,6 +112,7 @@ public class TraceControlKernelSessionTests extends TestCase {
     @Override
     @After
     public void tearDown()  throws Exception {
+        fFacility.waitForJobs();
     }
     
     /**
@@ -131,10 +132,15 @@ public class TraceControlKernelSessionTests extends TestCase {
         TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
 
         root.addChild(node);
-        node.connect();
-
         fFacility.waitForJobs();
 
+        fFacility.executeCommand(node, "connect");
+        int i = 0;
+        while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
+            i++;
+            fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
+        }
+
         // Verify that node is connected
         assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
 
This page took 0.025014 seconds and 5 git commands to generate.