use of zipkin.storage.elasticsearch.http.ElasticsearchHttpStorage in project zipkin by openzipkin.
the class LazyElasticsearchHttpStorage method compute.
@Override
protected ElasticsearchHttpStorage compute() {
try {
container = new GenericContainer(image).withExposedPorts(9200).waitingFor(new HttpWaitStrategy().forPath("/"));
container.start();
System.out.println("Will use TestContainers Elasticsearch instance");
} catch (Exception e) {
// Ignore
}
ElasticsearchHttpStorage result = computeStorageBuilder().build();
Component.CheckResult check = result.check();
if (check.ok) {
return result;
} else {
throw new AssumptionViolatedException(check.exception.getMessage(), check.exception);
}
}
Aggregations