Skip to content

Commit 6220ab3

Browse files
committed
test: adjust test_positive_pool_metric
Adjusted so it waits for liveness instead of requiring sleeping
1 parent 1eba985 commit 6220ab3

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

test/io/test_io.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,12 +2169,10 @@ def test_vary_default_header_set(defaultenv):
21692169
def test_positive_pool_metric(defaultenv):
21702170
"When a network failure is caused on the pg connection, pgrst_db_pool_available stays positive"
21712171

2172-
with run_pgproxy(defaultenv, proxy_timeout="10ms") as pgproxyhost:
2172+
with run_pgproxy(defaultenv, proxy_timeout="1ms") as pgproxyhost:
21732173
env = {**defaultenv, "PGHOST": pgproxyhost}
21742174

2175-
with run(env=env, wait_for=None) as postgrest:
2176-
time.sleep(3)
2177-
2175+
with run(env=env, wait_for=Admin.live) as postgrest:
21782176
response = postgrest.admin.get("/metrics", timeout=1)
21792177
assert response.status_code == 200
21802178

0 commit comments

Comments
 (0)