File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
qa/packaging/src/test/java/org/elasticsearch/packaging/util/docker Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -186,10 +186,10 @@ public static void waitForElasticsearchToStart() {
186
186
// Give the container enough time for security auto-configuration or a chance to crash out
187
187
Thread .sleep (STARTUP_SLEEP_INTERVAL_MILLISECONDS );
188
188
189
- // Set COLUMNS so that `ps` doesn't truncate its output
190
- psOutput = dockerShell .run ("bash -c 'COLUMNS=1000 jdk/bin/jps -ml '" ). stdout ();
191
-
192
- if (psOutput .contains ("org.elasticsearch.bootstrap.Elasticsearch " )) {
189
+ // 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
190
+ psOutput = dockerShell .run ("bash -c 'ps -ax | grep org.elasticsearch.bootstrap.Elasticsearch | grep -v grep | wc -l '" )
191
+ . stdout ();
192
+ if (psOutput .contains ("1 " )) {
193
193
isElasticsearchRunning = true ;
194
194
break ;
195
195
}
You can’t perform that action at this time.
0 commit comments