Skip to content

Commit

Permalink
Workaround for 'Too many open files' in test runs, refs #846
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jun 14, 2020
1 parent 0c27f10 commit a4ad5a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a4ad5a5

Please sign in to comment.