1 /**********************************************************************
2 * Copyright (c) 2016 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Patrick Tasse - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.tracecompass
.lttng2
.control
.ui
.tests
.model
.component
;
14 import org
.eclipse
.osgi
.util
.NLS
;
15 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.TargetNodeState
;
16 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.model
.impl
.TargetNodeComponent
;
17 import org
.eclipse
.tracecompass
.tmf
.ui
.tests
.shared
.IWaitCondition
;
20 * Condition that waits for a target node to be in connected state.
22 public class TargetNodeConnectedCondition
implements IWaitCondition
{
24 TargetNodeComponent fNode
;
32 public TargetNodeConnectedCondition(TargetNodeComponent node
) {
37 public boolean test() throws Exception
{
38 return fNode
.getTargetNodeState() == TargetNodeState
.CONNECTED
;
42 public String
getFailureMessage() {
43 return NLS
.bind("Target Node {0} did not reach CONNECTED state. State is ", fNode
.getName(), fNode
.getTargetNodeState().toString());