Skip to content

Commit

Permalink
tests/polaris: use curl to query polaris catalog health check
Browse files Browse the repository at this point in the history
Using `curl` which executes on the node where Polaris server runs so no
additional ports have to be open.

Fixes: CORE-8338

Signed-off-by: Michał Maślanka <[email protected]>
  • Loading branch information
mmaslankaprv committed Dec 16, 2024
1 parent 4343e5e commit 3f60aed
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/rptest/services/polaris_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@ def _polaris_ready():
self.logger.debug(
f"Querying polaris healthcheck on http://{node.account.hostname}:8182/healthcheck"
)
r = requests.get(
f"http://{node.account.hostname}:8182/healthcheck", timeout=10)

self.logger.info(
f"health check result status code: {r.status_code}")
return r.status_code == 200
out = node.account.ssh_output(
"curl -s -m 10 -o /dev/null -w '%{http_code}' http://localhost:8182/healthcheck"
)
status_code = int(out.decode('utf-8'))
self.logger.debug(
f"health check result status code: {status_code}")
return status_code == 200

wait_until(_polaris_ready,
timeout_sec=timeout_sec,
Expand Down

0 comments on commit 3f60aed

Please sign in to comment.