test: Initialize test databases sequentially when --jobs=1
@@ -644,6 +644,12 @@ def setup_test_cases(cases, conns):
tasks = []
+ if len(conns) == 1:
+ # Special case for --jobs=1
+ for case, dbname, setup_script in setup:
+ loop.run_until_complete(_setup_database(
+ dbname, setup_script, conns[0]))
+ else:
ci = 0
for case, dbname, setup_script in setup:
conn_args = conns[ci]
@@ -654,9 +660,9 @@ def setup_test_cases(cases, conns):
if ci == len(conns):
ci = 0
- result = loop.run_until_complete(asyncio.gather(*tasks))
+ loop.run_until_complete(asyncio.gather(*tasks))
- return result
+ return
async def _setup_database(dbname, setup_script, conn_args):
