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

Can't execute multiple tests in parallel #54

Closed
DanCardin opened this issue May 14, 2019 · 0 comments
Closed

Can't execute multiple tests in parallel #54

DanCardin opened this issue May 14, 2019 · 0 comments
Assignees

Comments

@DanCardin
Copy link
Contributor

Is your feature request related to a problem? Please describe.
pytest -n 4

E       sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "pg_database_datname_index"
E       DETAIL:  Key (datname)=(pytest_mock_resource_db_386) already exists.
E        [SQL: 'CREATE DATABASE "pytest_mock_resource_db_386"'] (Background on this error at: http://sqlalche.me/e/gkpj)

Describe the solution you'd like
Starting here:
https://github.com/schireson/schireson-pytest-mock-resources/blob/master/src/pytest_mock_resources/fixture/database/relational/postgresql.py#L110

we shouldn't be setting the isolation level like that, firstly. but lastly the way that it's allocating the database names means we can't execute tests in parallel.

This is really unfortunate because otherwise the design seems really amenable to parallel use. This is a hard blocker to use in apis like flight-manager which would be really nice!

oakhan3 added a commit that referenced this issue May 15, 2019
@oakhan3 oakhan3 self-assigned this May 15, 2019
oakhan3 added a commit that referenced this issue May 15, 2019
oakhan3 added a commit that referenced this issue May 15, 2019
oakhan3 added a commit that referenced this issue May 15, 2019
oakhan3 added a commit that referenced this issue May 15, 2019
oakhan3 added a commit that referenced this issue May 15, 2019
oakhan3 added a commit that referenced this issue May 15, 2019
oakhan3 added a commit that referenced this issue May 15, 2019
oakhan3 added a commit that referenced this issue May 15, 2019
oakhan3 added a commit that referenced this issue May 15, 2019
@oakhan3 oakhan3 closed this as completed Jun 6, 2019
langelgjm pushed a commit that referenced this issue Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants