import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
import org.eclipse.tracecompass.internal.lttng2.control.ui.views.service.ILttngControlService;
import org.eclipse.tracecompass.tmf.remote.core.proxy.TmfRemoteConnectionFactory;
+import org.eclipse.tracecompass.tmf.ui.tests.shared.WaitUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
fFacility.waitForJobs();
fFacility.executeCommand(node, "connect");
- int i = 0;
- while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
- i++;
- fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
- }
+ WaitUtils.waitUntil(new TargetNodeConnectedCondition(node));
// Verify that node is connected
assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());