Wait for ES in Docker to start before checking files (#60825)
Closes #54817.
This commit is contained in:
parent
8e9f8ba420
commit
5c76978e80
|
@ -476,7 +476,11 @@ public class DockerTests extends PackagingTestCase {
|
||||||
/**
|
/**
|
||||||
* Check that there are no files with a GID other than 0.
|
* 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;
|
final String findResults = sh.run("find . -not -gid 0").stdout;
|
||||||
|
|
||||||
assertThat("Found some files whose GID != 0", findResults, is(emptyString()));
|
assertThat("Found some files whose GID != 0", findResults, is(emptyString()));
|
||||||
|
|
Loading…
Reference in New Issue