Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Test suite fails to run if any requests are first processed by BE #221

Open
ssciolla opened this issue Feb 25, 2020 · 0 comments
Open

Test suite fails to run if any requests are first processed by BE #221

ssciolla opened this issue Feb 25, 2020 · 0 comments
Labels

Comments

@ssciolla
Copy link
Contributor

ssciolla commented Feb 25, 2020

After using docker-compose up to load the application in development mode, if any requests are processed by the backend, the test suite (i.e. python manage.py test -v 3) seems to fail to run within the student_explorer container.

django.db.utils.OperationalError: Problem installing fixture '/usr/src/app/student_explorer/fixtures/dev_users.json': Could not load auth.User(pk=1): (1205, 'Lock wait timeout exceeded; try restarting transaction')

Note that it should work if you simply run docker-compose up and immediately run the test suite within the container.

Theoretically, according to Django's "Writing and running tests" docs, a separate test database should be created and destroyed on each run. There seems to be some issue loading dev_users.json when this 'request then test' situation occurs.

@ssciolla ssciolla added the bug label Feb 25, 2020
@ssciolla ssciolla self-assigned this Feb 25, 2020
@ssciolla ssciolla removed their assignment Jul 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant