use of io.pravega.test.system.framework.TestFrameworkException in project pravega by pravega.
the class DockerBasedService method getServiceID.
private String getServiceID() {
Service.Criteria criteria = Service.Criteria.builder().serviceName(this.serviceName).build();
String serviceId = null;
try {
List<Service> serviceList = Exceptions.handleInterruptedCall(() -> dockerClient.listServices(criteria));
log.info("Service list size {}", serviceList.size());
if (!serviceList.isEmpty()) {
serviceId = serviceList.get(0).id();
}
} catch (DockerException e) {
throw new TestFrameworkException(TestFrameworkException.Type.RequestFailed, "Unable to get service id", e);
}
return serviceId;
}
Aggregations