From 958ba794ff1522ff7defc9b612b93fb7f7299df8 Mon Sep 17 00:00:00 2001 From: gaobinlong Date: Mon, 30 Sep 2024 02:38:15 +0800 Subject: [PATCH] Fix testHAProxyModeConnectionWorks is flaky (#16087) * Fix testHAProxyModeConnectionWorks is flaky Signed-off-by: Gao Binlong * Optimize health check method Signed-off-by: Gao Binlong --------- Signed-off-by: Gao Binlong --- qa/remote-clusters/docker-compose.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qa/remote-clusters/docker-compose.yml b/qa/remote-clusters/docker-compose.yml index cf6aefcf5c1a3..2112da17efe6e 100644 --- a/qa/remote-clusters/docker-compose.yml +++ b/qa/remote-clusters/docker-compose.yml @@ -72,3 +72,11 @@ services: - "9600" volumes: - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro + depends_on: + - opensearch-2 + healthcheck: + test: ["CMD", "timeout", "1", "bash", "-c", "cat < /dev/null > /dev/tcp/localhost/9600"] + interval: 2s + timeout: 1s + retries: 5 + start_period: 15s