lttng: Fix ControlViewTest
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.control.ui.tests / src / org / eclipse / tracecompass / lttng2 / control / ui / tests / model / component / TraceControlUstSession2Test.java
index 707eb0060030080ea08d9163aa1dace3f5a1d905..0a427b69d5dde8741a33f6e5fdb16d807b06da33 100644 (file)
@@ -25,6 +25,7 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.remote.core.IRemoteConnection;
 import org.eclipse.tracecompass.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceDomainType;
 import org.eclipse.tracecompass.internal.lttng2.control.core.model.impl.BufferType;
 import org.eclipse.tracecompass.internal.lttng2.control.core.model.impl.ChannelInfo;
 import org.eclipse.tracecompass.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
@@ -39,6 +40,7 @@ import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.Trac
 import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
 import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
 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;
@@ -115,11 +117,7 @@ public class TraceControlUstSession2Test {
         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));
 
         // Get provider groups
         ITraceControlComponent[] groups = node.getChildren();
@@ -147,7 +145,7 @@ public class TraceControlUstSession2Test {
         // Enable default channel on created session above
         // ------------------------------------------------------------------------
         EnableChannelDialogStub channelStub = new EnableChannelDialogStub();
-        channelStub.setIsKernel(false);
+        channelStub.setDomain(TraceDomainType.UST);
         ChannelInfo info = (ChannelInfo)channelStub.getChannelInfo();
         info.setName("mychannel");
         info.setOverwriteMode(false);
This page took 0.026349 seconds and 5 git commands to generate.