Skip to content

Commit

Permalink
Wait for readiness in docker readiness test (elastic#108681)
Browse files Browse the repository at this point in the history
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 elastic#108523
  • Loading branch information
rjernst authored and parkertimmins committed May 17, 2024
1 parent f1a3b45 commit 78dee68
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,6 @@ private List<String> 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
Expand All @@ -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")
Expand Down

0 comments on commit 78dee68

Please sign in to comment.