Allow more time for Docker Compose-managed containers to be healthy

When running with Elasticsearch 9, the recently added test that
checks connectivity using SSL is flaky on CI. When the test fails,
it does so because Docker Compose reports that the container is
unhealthy when running docker compose up. One possibility is that
this is due to the container taking too long to reach a healthy
state. This commit attempts to confirm that theory and hopefully
address the problem by configuring a wait timeout of 120 seconds
for the up command.

See gh-49385
This commit is contained in:
Andy Wilkinson
2026-03-04 15:02:15 +00:00
parent e5325874fb
commit d5f088a61b
@@ -121,6 +121,8 @@ class DockerComposeTestExtension implements BeforeTestExecutionCallback, AfterTe
properties.put("spring.docker.compose.skip.in-tests", "false");
properties.put("spring.docker.compose.file", composeFile);
properties.put("spring.docker.compose.stop.command", "down");
properties.put("spring.docker.compose.start.arguments[0]", "--wait-timeout");
properties.put("spring.docker.compose.start.arguments[1]", "120");
application.setDefaultProperties(properties);
return application;
}