Skip to content

Conversation

@tutou2356
Copy link
Contributor

Added a mechanism to separate database-modifying tests:
1.Created a SYNCHRONOUS() helper function in utils.py to identify tests that modify the database
2.Added a new pytest command-line option (--synchronous) to run these tests separately
3,Modified the conftest.py to handle this separation logic
Modified tests to avoid database locking:
1.Added @pytest.mark.skipif(not SYNCHRONOUS(), reason="...") to tests that modify the database
2.Ensured database-modifying tests use "-u never" flag when appropriate to avoid unnecessary database updates
3.Updated test classes to avoid database updates in parallel test runs

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

Successfully merging this pull request may close these issues.

1 participant