Changes between Initial Version and Version 1 of Ticket #29062, comment 17


Ignore:
Timestamp:
Feb 5, 2021, 1:27:01 PM (4 years ago)
Author:
Chris Jerdonek

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29062, comment 17

    initial v1  
    11FYI, yesterday I found and described the root cause of this issue on #32416. (There I was interested in a different issue that affected non-SQLite databases, though, namely database connections not being closed when `LiveServerTestCase` is used with the new threading behavior.)
    22
    3 If you read my first comments on that issue, you can see that a possible fix is to define suitable method overrides in `ThreadedWSGIServer`. Basically the same SQLite-specific connection-sharing logic that `LiveServerTestCase.LiveServerThread()` and `LiveServerThread.run()` have needs to be added to `ThreadedWSGIServer`. The `LiveServerTestCase` and `LiveServerThread` logic can be found more or less here:
     3If you read my first comments on that issue, you can see that a possible fix is to define suitable method overrides in `ThreadedWSGIServer`. Basically the same SQLite-specific connection-sharing logic that `LiveServerTestCase.setUpClass()` and `LiveServerThread.run()` have needs to be added to `ThreadedWSGIServer`. The `LiveServerTestCase` and `LiveServerThread` logic can be found more or less here:
    44https://github.com/django/django/blob/63d239db037f02d98b7771c90422840bbb4a319a/django/test/testcases.py#L1524-L1537
    55https://github.com/django/django/blob/63d239db037f02d98b7771c90422840bbb4a319a/django/test/testcases.py#L1465-L1469
Back to Top