From bfb4f900e7cbeb129a99ddfba38d620258d81cda Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Tue, 17 Feb 2026 10:48:16 +0500 Subject: [PATCH] test(io): increase statement_timeout value of anonymous role It is too low which leaves a small window of values to use when testing other features. Signed-off-by: Taimoor Zaeem --- test/io/fixtures/roles.sql | 2 +- test/io/test_io.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/io/fixtures/roles.sql b/test/io/fixtures/roles.sql index 3685f8b7c..1a6382253 100644 --- a/test/io/fixtures/roles.sql +++ b/test/io/fixtures/roles.sql @@ -21,5 +21,5 @@ ALTER ROLE postgrest_test_repeatable_read SET default_transaction_isolation = 'R ALTER ROLE postgrest_test_w_superuser_settings SET log_min_duration_statement = 1; ALTER ROLE postgrest_test_w_superuser_settings SET log_min_messages = 'fatal'; -ALTER ROLE postgrest_test_anonymous SET statement_timeout TO '2s'; +ALTER ROLE postgrest_test_anonymous SET statement_timeout TO '5s'; ALTER ROLE postgrest_test_author SET statement_timeout TO '10s'; diff --git a/test/io/test_io.py b/test/io/test_io.py index e384a28fe..587483928 100644 --- a/test/io/test_io.py +++ b/test/io/test_io.py @@ -920,11 +920,11 @@ def test_role_settings(defaultenv): with run(env=env) as postgrest: # statement_timeout for postgrest_test_anonymous response = postgrest.session.get("/rpc/get_guc_value?name=statement_timeout") - assert response.text == '"2s"' + assert response.text == '"5s"' # reload statement_timeout with NOTIFY response = postgrest.session.post( - "/rpc/change_role_statement_timeout", data={"timeout": "5s"} + "/rpc/change_role_statement_timeout", data={"timeout": "8s"} ) assert response.text == "" assert response.status_code == 204 @@ -935,7 +935,7 @@ def test_role_settings(defaultenv): sleep_until_postgrest_config_reload() response = postgrest.session.get("/rpc/get_guc_value?name=statement_timeout") - assert response.text == '"5s"' + assert response.text == '"8s"' # statement_timeout for postgrest_test_author headers = jwtauthheader({"role": "postgrest_test_author"}, SECRET)