-
Notifications
You must be signed in to change notification settings - Fork 96
(WIP) Problem: Django tests fail when run consecutively #511
(WIP) Problem: Django tests fail when run consecutively #511
Conversation
In particular failures happen in the VCR checks for whether the cassettes have all been played. This is because the TAS API results are cached on disk. Solution: Disable caching when testing by using the `DummyCache` backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work, but we might be able to provide a better experience and example for other setting overrides in test
'default': { | ||
'BACKEND': 'django.core.cache.backends.dummy.DummyCache', | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could lead to unintended consequences.. TESTING
previously enabled the ability to run ./manage.py test
.
Rather than overloading TESTING
perhaps we could go this route instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't be the first time I'm confused about the historical purpose for a variable/setting. The problem is we probably need caching disabled for all tests - so it becomes very tedious very quickly. But maybe your idea of making the caching backend configurable is the answer.
Ok, I'll rework this PR to make the backend configurable instead. |
Closed in favor of #626 |
In particular failures happen in the VCR checks for whether the
cassettes have all been played. This is because the TAS API results are
cached on disk.
Solution: Disable caching when testing by using the
DummyCache
backendChecklist before merging Pull Requests
[ ] New test(s) included to reproduce the bug/verify the feature[ ] Documentation created/updated at Example link to documentation to give context to the feature[ ] If necessary, include a snippet in CHANGELOG.md[ ] New variables supported in Clank[ ] New variables committed to secrets repos