From b71345ab090775aee5ae3c7d78861af60b2361dd Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Mon, 18 May 2026 10:44:05 -0500 Subject: [PATCH] test: adjust test_positive_pool_metric Adjusted so it waits for liveness instead of requiring sleeping --- test/io/test_io.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/io/test_io.py b/test/io/test_io.py index 8c63cb0b7..32dd371b6 100644 --- a/test/io/test_io.py +++ b/test/io/test_io.py @@ -1815,12 +1815,10 @@ def test_server_timing_transaction_duration(defaultenv, metapostgrest): 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