test: Improve io test perfomance
Local test improves performance by 15%.
This commit is contained in:
committed by
Wolfgang Walther
parent
1e9031573c
commit
01e65f5221
@@ -139,6 +139,8 @@ def dumpconfig(configpath=None, env=None, stdin=None):
|
||||
def run(configpath=None, stdin=None, env=None, port=None, adminport=None):
|
||||
"Run PostgREST and yield an endpoint that is ready for connections."
|
||||
env = env or {}
|
||||
env["PGRST_DB_POOL"] = "1"
|
||||
env["PGRST_DB_POOL_TIMEOUT"] = "1"
|
||||
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
if port:
|
||||
@@ -465,7 +467,7 @@ def test_iat_claim(defaultenv):
|
||||
response = postgrest.session.get("/authors_only", headers=headers)
|
||||
assert response.status_code == 200
|
||||
|
||||
time.sleep(0.5)
|
||||
time.sleep(0.1)
|
||||
|
||||
|
||||
def test_app_settings(defaultenv):
|
||||
@@ -621,7 +623,7 @@ def test_db_schema_notify_reload(defaultenv):
|
||||
"/rpc/change_db_schema_and_full_reload", data={"schemas": "v1"}
|
||||
)
|
||||
|
||||
time.sleep(0.5)
|
||||
time.sleep(0.1)
|
||||
|
||||
response = postgrest.session.get("/rpc/get_guc_value?name=search_path")
|
||||
assert response.text == '"v1, public"'
|
||||
|
||||
Reference in New Issue
Block a user