Longer time limit for test_paginate_compound_keys

It was failing intermittently in Travis - see #209
This commit is contained in:
Simon Willison 2018-04-17 18:08:51 -07:00
commit aa2abad917
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52
2 changed files with 10 additions and 5 deletions

View file

@ -9,7 +9,7 @@ import tempfile
import time
def app_client():
def app_client(sql_time_limit_ms=None):
with tempfile.TemporaryDirectory() as tmpdir:
filepath = os.path.join(tmpdir, 'test_tables.db')
conn = sqlite3.connect(filepath)
@ -22,7 +22,7 @@ def app_client():
[filepath],
page_size=50,
max_returned_rows=100,
sql_time_limit_ms=20,
sql_time_limit_ms=sql_time_limit_ms or 20,
metadata=METADATA,
plugins_dir=plugins_dir,
)
@ -32,6 +32,10 @@ def app_client():
yield ds.app().test_client
def app_client_longer_time_limit():
yield from app_client(200)
def generate_compound_rows(num):
for a, b, c in itertools.islice(
itertools.product(string.ascii_lowercase, repeat=3), num