#36946: Running tests on SQLite with --parallel (using spawn) does not respect
DATABASES["TEST"]["NAME"]
-------------------------------------+-------------------------------------
     Reporter:  Sage Abdullah        |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  Testing framework    |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:  tests, sqlite,       |             Triage Stage:  Accepted
  parallel                           |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

 * stage:  Unreviewed => Accepted

Comment:

 Thanks Sage, I suspected this was not handled but hadn't yet verified.
 Would you like to submit a PR?

 > the logic in ​setup_worker_connection does not use the clone db names
 (it always uses {alias}_{_worker_id}.sqlite3 instead) when copying them
 over to the in-memory database.

 Related: I've noticed we have the same `OperationalError` when a parallel
 test worker dies. In that case, the worker_id increments past the number
 of databases, and a connection is requested for a nonexistent database. At
 a glance, it looks like your suggested patch fixes that as well.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36946#comment:1>
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 visit 
https://groups.google.com/d/msgid/django-updates/0107019c905d3b73-0a8406fb-449c-4f17-b736-df62166f183b-000000%40eu-central-1.amazonses.com.

Reply via email to