Skip to content

Commit

Permalink
Wait for ES in Docker to start before checking files (#60825)
Browse files Browse the repository at this point in the history
Closes #54817.
  • Loading branch information
pugnascotia committed Aug 7, 2020
1 parent 8e9f8ba commit 5c76978
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,11 @@ public void test100NoCoreFilesInImage() {
/**
* Check that there are no files with a GID other than 0.
*/
public void test101AllFilesAreGroupZero() {
public void test101AllFilesAreGroupZero() throws Exception {
// We wait for Elasticsearch to finish starting up in order to avoid the situation where `find` traverses the filesystem
// and sees files in a directory listing, which have disappeared by the time `find` tries to examine them. This periodically
// happened with the keystore, for example.
waitForElasticsearch(installation);
final String findResults = sh.run("find . -not -gid 0").stdout;

assertThat("Found some files whose GID != 0", findResults, is(emptyString()));
Expand Down

0 comments on commit 5c76978

Please sign in to comment.