Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest-django builds incorrect database names with pytest 5.3.3 and pytest-xdist #801

Closed
rixx opened this issue Jan 17, 2020 · 2 comments
Closed
Labels

Comments

@rixx
Copy link

rixx commented Jan 17, 2020

pytet 5.3.3 was just released today, and pytest-django performs very slowly and incorrectly when run with pytest-xdist. There is a tracking issue up at pytest-dev/pytest#6492, which includes a git-bisect run and a more detailed description.

The tl;dr is that due to a change in fixture handling, pytest-django plus pytest-xdist build increasingly long database names until you reach errors such as django.core.exceptions.ImproperlyConfigured: The database name 'test_travis_ci_test_gw0_gw0_gw0_gw0_gw0_gw0_gw0_gw0_gw0_gw0_gw0_gw0_gw0' (71 characters) is longer than PostgreSQL's limit of 63 characters. Supply a shorter NAME in settings.DATABASES., while performing very slowly.

@blueyed
Copy link
Contributor

blueyed commented Jan 17, 2020

Yeah, tests/test_db_setup.py::TestSqliteWithToxAndXdist::test_db_with_tox_suffix shows the failure.

@rixx
Copy link
Author

rixx commented Jan 17, 2020

The other issue has by now determined that this is a problem that occurs around differently scoped fixtures and their teardown, so it's not pytest-django specific. Apologies for the duplicate issue.

@rixx rixx closed this as completed Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants