Skip to content

Commit 9ddabeb

Browse files
committed
outputting server version in test logs
1 parent beff7b4 commit 9ddabeb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

java-client/src/test/java/co/elastic/clients/elasticsearch/ElasticsearchTestServer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public class ElasticsearchTestServer implements AutoCloseable {
5353
private String url;
5454
private SSLContext sslContext;
5555
private ElasticsearchClient client;
56+
private static String version;
5657

5758
private static ElasticsearchTestServer global;
5859
private static final String artifactsSnapshotUrl = "https://artifacts-snapshot.elastic" +
@@ -87,13 +88,13 @@ public static synchronized ElasticsearchTestServer global(@Nullable String passw
8788
}
8889
} catch (Exception e) {
8990
// Create container
90-
System.out.println("Starting global ES test server.");
91+
System.out.println("Starting global ES test server version " + version);
9192
global = new ElasticsearchTestServer();
9293
global.start();
9394
}
9495

9596
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
96-
System.out.println("Stopping global ES test server.");
97+
System.out.println("Stopping global ES test server version " + version);
9798
global.close();
9899
}));
99100
}
@@ -161,7 +162,7 @@ public synchronized ElasticsearchTestServer start() {
161162
}
162163

163164
String esImage = "docker.elastic.co/elasticsearch/elasticsearch:" + version;
164-
System.out.println("Starting elasticsearch server version " + version);
165+
this.version = version.toString();
165166

166167
DockerImageName image;
167168
if (plugins.length == 0) {

0 commit comments

Comments
 (0)