use of org.jboss.tools.openshift.reddeer.condition.core.ServicePodsExist in project jbosstools-openshift by jbosstools.
the class OpenShiftServiceRequirement method waitForResources.
private void waitForResources(final String serviceName, final String projectName, final IService service) {
new WaitUntil(new ServicePodsExist(serviceName, projectName, connection), TimePeriod.VERY_LONG);
new WaitUntil(new ResourceExists(ResourceKind.REPLICATION_CONTROLLER, new BaseMatcher<List<IResource>>() {
@Override
public boolean matches(Object item) {
if (!(item instanceof List)) {
return false;
}
@SuppressWarnings("unchecked") List<IReplicationController> resources = (List<IReplicationController>) item;
if (resources.isEmpty()) {
return false;
}
return ResourceUtils.getReplicationControllerFor(service, resources) != null;
}
@Override
public void describeTo(Description description) {
}
}, projectName, connection), TIMEPERIOD_WAIT_FOR_BUILD);
}
Aggregations