test-backend: Avoid dropping/rebuiling zulip_test database.

The test-backend parallel test runner system doesn't actually use the
zulip_test database; instead, it creates its own databases off the
zulip_test_template database.

We were accidentally running `tools/generate_fixtures` even when there
are no changes, because this function is shared with the
tools/lib/test_server.py codebase, which needs us to do the work of
creating a test database for it off the zulip_test_template database.

Fixing this saves about 1.5s / 4s of the runtime of a single test.
This commit is contained in:
Tim Abbott
2019-05-28 15:15:11 -07:00
parent e0afdb675f
commit 095ff28277
2 changed files with 16 additions and 5 deletions

View File

@@ -62,7 +62,7 @@ def test_server_running(force: bool=False, external_host: str='testserver',
set_up_django(external_host)
if use_db:
update_test_databases_if_required()
update_test_databases_if_required(rebuild_test_database=True)
# Run this not through the shell, so that we have the actual PID.
run_dev_server_command = ['tools/run-dev.py', '--test']