#29062: "database table locked errors" when using sqlite in-memory database with
LiveServerTestCase
-------------------------------------+-------------------------------------
     Reporter:  Juozas Masiulis      |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Testing framework    |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:  sqlite, testing,     |             Triage Stage:  Accepted
  databases                          |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Chris Jerdonek):

 I posted a PR ([https://github.com/django/django/pull/14011 PR #14011]) on
 ticket #32416 that, once merged, I believe should allow this ticket to be
 fixed with a one-line change (not counting any test(s)):

 {{{
 diff --git a/django/test/testcases.py b/django/test/testcases.py
 index cc2f24dd5d..8717eec1c5 100644
 --- a/django/test/testcases.py
 +++ b/django/test/testcases.py
 @@ -1472,7 +1472,9 @@ class LiveServerThread(threading.Thread):
          try:
              # Create the handler for serving static and media files
              handler =
 self.static_handler(_MediaFilesHandler(WSGIHandler()))
 -            self.httpd = self._create_server()
 +            self.httpd = self._create_server(
 +                connections_override=self.connections_override
 +            )
              # If binding to port zero, assign the port allocated by the
 OS.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29062#comment:18>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.826e683ec2bc0701124871fdaeec310e%40djangoproject.com.

Reply via email to