perf: fix space leaks by downgrading fuzzyset to v0.2.4

This commit is contained in:
Laurence Isla
2024-04-11 14:13:20 -05:00
committed by GitHub
parent b88191299f
commit 460259548d
6 changed files with 38 additions and 13 deletions
+18
View File
@@ -49,3 +49,21 @@ def test_openapi_in_big_schema(defaultenv):
with run(env=env) as postgrest:
response = postgrest.session.get("/")
assert response.status_code == 200
# See: https://github.com/PostgREST/postgrest/issues/3329
def test_should_not_fail_with_stack_overflow(defaultenv):
"requesting a non-existent relationship should not fail with stack overflow due to fuzzy search of candidates"
env = {
**defaultenv,
"PGRST_DB_SCHEMAS": "apflora",
"PGRST_DB_POOL": "2",
"PGRST_DB_ANON_ROLE": "postgrest_test_anonymous",
}
with run(env=env, wait_max_seconds=30) as postgrest:
response = postgrest.session.get("/unknown-table?select=unknown-rel(*)")
assert response.status_code == 400
data = response.json()
assert data["code"] == "PGRST200"