Skip to content

Commit 7e310b2

Browse files
committed
[Test] Rework detecting elasticsearch process in docker tests
This tweaks detecting the elasticsearch process id by using jps instead of ps which has been problematic in the past exceeding available COLUMN sizes due to es commandline invocation getting longer and longer
1 parent 9b1815c commit 7e310b2

File tree

1 file changed

+1
-1
lines changed
  • qa/packaging/src/test/java/org/elasticsearch/packaging/util/docker

1 file changed

+1
-1
lines changed

qa/packaging/src/test/java/org/elasticsearch/packaging/util/docker/Docker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public static void waitForElasticsearchToStart() {
187187
Thread.sleep(STARTUP_SLEEP_INTERVAL_MILLISECONDS);
188188

189189
// Set COLUMNS so that `ps` doesn't truncate its output
190-
psOutput = dockerShell.run("bash -c 'COLUMNS=4000 ps ax'").stdout();
190+
psOutput = dockerShell.run("bash -c 'COLUMNS=1000 jdk/bin/jps -ml'").stdout();
191191

192192
if (psOutput.contains("org.elasticsearch.bootstrap.Elasticsearch")) {
193193
isElasticsearchRunning = true;

0 commit comments

Comments
 (0)