use of org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException in project jbosstools-openshift by jbosstools.
the class DeleteResourceTest method deleteResourceAndAssert.
private void deleteResourceAndAssert(Resource resource) {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
OpenShiftResource rsrc = explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName()).getOpenShiftResources(resource).get(0);
String resourceName = rsrc.getName();
rsrc.delete();
try {
OpenShiftResourceExists openShiftResourceExists = new OpenShiftResourceExists(resource, resourceName, ResourceState.UNSPECIFIED, projectReq.getProjectName(), connectionReq.getConnection());
new WaitWhile(openShiftResourceExists, TimePeriod.getCustom(15));
} catch (WaitTimeoutExpiredException ex) {
fail("Route " + resource + " should be deleted at this point but it is still present.");
}
}
Aggregations