Skip to content

Commit 3b995f1

Browse files
committed
Workaround docker test issue
1 parent 4ec6616 commit 3b995f1

File tree

1 file changed

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

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@ public class Docker {
7575
public static final int STARTUP_SLEEP_INTERVAL_MILLISECONDS = 1000;
7676
public static final int STARTUP_ATTEMPTS_MAX = 30;
7777

78+
/**
79+
* The length of the command exceeds what we can use for COLUMNS so we use
80+
* a workaround to find the process we're looking for
81+
*/
7882
private static final String ELASTICSEARCH_FULL_CLASSNAME = "org.elasticsearch.bootstrap.Elasticsearch";
7983
private static final String FIND_ELASTICSEARCH_PROCESS = "for pid in $(ps -eo pid,comm | grep java | awk '\\''{print $1}'\\''); "
8084
+ "do cmdline=$(tr \"\\0\" \" \" < /proc/$pid/cmdline 2>/dev/null); [[ $cmdline == *"
8185
+ ELASTICSEARCH_FULL_CLASSNAME
8286
+ "* ]] && echo \"$pid: $cmdline\"; done";
83-
// The length of the command exceeds what we can use for COLUMNS so we use a pipe to detect the process we're looking for
8487

8588
/**
8689
* Tracks the currently running Docker image. An earlier implementation used a fixed container name,

0 commit comments

Comments
 (0)