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 <taimoorzaeem@gmail.com>
This commit is contained in:
committed by
Steve Chavez
parent
055efe7abd
commit
bfb4f900e7
@@ -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_duration_statement = 1;
|
||||||
ALTER ROLE postgrest_test_w_superuser_settings SET log_min_messages = 'fatal';
|
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';
|
ALTER ROLE postgrest_test_author SET statement_timeout TO '10s';
|
||||||
|
|||||||
+3
-3
@@ -920,11 +920,11 @@ def test_role_settings(defaultenv):
|
|||||||
with run(env=env) as postgrest:
|
with run(env=env) as postgrest:
|
||||||
# statement_timeout for postgrest_test_anonymous
|
# statement_timeout for postgrest_test_anonymous
|
||||||
response = postgrest.session.get("/rpc/get_guc_value?name=statement_timeout")
|
response = postgrest.session.get("/rpc/get_guc_value?name=statement_timeout")
|
||||||
assert response.text == '"2s"'
|
assert response.text == '"5s"'
|
||||||
|
|
||||||
# reload statement_timeout with NOTIFY
|
# reload statement_timeout with NOTIFY
|
||||||
response = postgrest.session.post(
|
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.text == ""
|
||||||
assert response.status_code == 204
|
assert response.status_code == 204
|
||||||
@@ -935,7 +935,7 @@ def test_role_settings(defaultenv):
|
|||||||
sleep_until_postgrest_config_reload()
|
sleep_until_postgrest_config_reload()
|
||||||
|
|
||||||
response = postgrest.session.get("/rpc/get_guc_value?name=statement_timeout")
|
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
|
# statement_timeout for postgrest_test_author
|
||||||
headers = jwtauthheader({"role": "postgrest_test_author"}, SECRET)
|
headers = jwtauthheader({"role": "postgrest_test_author"}, SECRET)
|
||||||
|
|||||||
Reference in New Issue
Block a user