use of org.jboss.tools.openshift.ui.bot.test.application.v3.adapter.condition.SuspendedTreeItemIsReady in project jbosstools-openshift by jbosstools.
the class DebuggingEAPAppTest method getSuspendedThreadTreeItem.
private TreeItem getSuspendedThreadTreeItem(LaunchView debugView) {
// get top item
debugView.activate();
DefaultTree parent = new DefaultTree();
TreeItem remoteDebuggerTreeItem = parent.getItems().stream().filter(containsStringPredicate("Remote debugger")).findFirst().get();
List<TreeItem> items = remoteDebuggerTreeItem.getItems();
TreeItem openJDKTreeItem = items.get(0);
// this could (and will) change when run with another JDK - need
// investigation
assertTrue(openJDKTreeItem.getText().contains("OpenJDK"));
// wait until we can see the suspended thread
SuspendedTreeItemIsReady suspendedTreeItemIsReady = new SuspendedTreeItemIsReady(openJDKTreeItem);
new WaitUntil(suspendedTreeItemIsReady, TimePeriod.VERY_LONG);
return suspendedTreeItemIsReady.getSuspendedTreeItem();
}
Aggregations