test: adjust test_positive_pool_metric
Adjusted so it waits for liveness instead of requiring sleeping
This commit is contained in:
+2
-4
@@ -2169,12 +2169,10 @@ def test_vary_default_header_set(defaultenv):
|
||||
def test_positive_pool_metric(defaultenv):
|
||||
"When a network failure is caused on the pg connection, pgrst_db_pool_available stays positive"
|
||||
|
||||
with run_pgproxy(defaultenv, proxy_timeout="10ms") as pgproxyhost:
|
||||
with run_pgproxy(defaultenv, proxy_timeout="1ms") as pgproxyhost:
|
||||
env = {**defaultenv, "PGHOST": pgproxyhost}
|
||||
|
||||
with run(env=env, wait_for=None) as postgrest:
|
||||
time.sleep(3)
|
||||
|
||||
with run(env=env, wait_for=Admin.live) as postgrest:
|
||||
response = postgrest.admin.get("/metrics", timeout=1)
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
Reference in New Issue
Block a user