From eed77dd9a2bc96e81f37ea18d65840786921e8b4 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Wed, 15 May 2024 07:53:55 -0700 Subject: [PATCH] Wait for readiness in docker readiness test Previously readiness waited only on a master node being elected. Recently it was also made to wait on file settings being applied. Yet the node may be fully started before those file settings are applied. The test expected readiness was ok after the node finishes starting. This commit retries the readiness check until it succeeds since readiness state will be updated async to the node finishing starting. closes #108523 --- .../java/org/elasticsearch/packaging/test/DockerTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qa/packaging/src/test/java/org/elasticsearch/packaging/test/DockerTests.java b/qa/packaging/src/test/java/org/elasticsearch/packaging/test/DockerTests.java index 40752e5b296bc..23b778aa0878b 100644 --- a/qa/packaging/src/test/java/org/elasticsearch/packaging/test/DockerTests.java +++ b/qa/packaging/src/test/java/org/elasticsearch/packaging/test/DockerTests.java @@ -1211,7 +1211,6 @@ private List listPlugins() { /** * Check that readiness listener works */ - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/108523") public void test500Readiness() throws Exception { assertFalse(readinessProbe(9399)); // Disabling security so we wait for green @@ -1221,7 +1220,8 @@ public void test500Readiness() throws Exception { ); waitForElasticsearch(installation); dumpDebug(); - assertTrue(readinessProbe(9399)); + // readiness may still take time as file settings are applied into cluster state (even non-existent file settings) + assertBusy(() -> assertTrue(readinessProbe(9399))); } @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/99508")