#34825: SQLite database files are not destroyed after tests
-----------------------------------+--------------------------------------
Reporter: Jacob Walls | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Comment (by David Sanders):
I'm new to the test framework but here's what I found when doing some
investigating:
Looks like the issue is with the new `setup_worker_connection()` method
for the sqlite3 backend in that commit you bisected.
It attempts to copy from `other_<worker-id>.sqlite3` into memory … but it
doesn't exist because the test runner doesn't create databases for the
"other" alias. The default behaviour of `sqlite3.connect()` is to create
a database because the default mode is `mode=rwc`, `c` being for create.
We can apparently change the mode to `mode=rw` in which case an exception
is raised. Or we can adjust the logic to use the same settings as "fork"
if the file doesn't exist. 🤔
--
Ticket URL: <https://code.djangoproject.com/ticket/34825#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018a8027fe6f-5a067ed6-4c65-48cd-90fd-9191293f1c33-000000%40eu-central-1.amazonses.com.