Workaround for 'Too many open files' in test runs, refs #846

This commit is contained in:
Simon Willison 2020-06-13 17:26:02 -07:00
commit a4ad5a504c
2 changed files with 4 additions and 1 deletions

View file

@ -268,6 +268,9 @@ def make_app_client(
"default_page_size": 50,
"max_returned_rows": max_returned_rows or 100,
"sql_time_limit_ms": sql_time_limit_ms or 200,
# Default is 3 but this results in "too many open files"
# errors when running the full test suite:
"num_sql_threads": 1,
}
)
ds = Datasette(

View file

@ -1320,7 +1320,7 @@ def test_config_json(app_client):
"suggest_facets": True,
"default_cache_ttl": 5,
"default_cache_ttl_hashed": 365 * 24 * 60 * 60,
"num_sql_threads": 3,
"num_sql_threads": 1,
"cache_size_kb": 0,
"allow_csv_stream": True,
"max_csv_mb": 100,