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

Tests must be run sequentially #329

Open
joshuata opened this issue Jan 27, 2021 · 1 comment
Open

Tests must be run sequentially #329

joshuata opened this issue Jan 27, 2021 · 1 comment

Comments

@joshuata
Copy link
Collaborator

Currently the tests will fail if run using the standard npm test command as it runs them in parallel. Each test suite uses the same database, so they write over each other constantly causing transient failures.

An ideal solution would be an adapter to jest that would allow you to run a test within a database transaction; start it before running the test function, and cancel it at the end. This would guarantee that tests do not mess with each other's state.

@joshuata
Copy link
Collaborator Author

Here's an example in mocha - the idea is similar:
sequelize/sequelize#11408 (comment)

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

1 participant