mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
[2.2.x] Fixed #30171 -- Fixed DatabaseError in servers tests.
Made DatabaseWrapper thread sharing logic reentrant. Used a reference counting like scheme to allow nested uses. The error appeared after8c775391b7. Backport of76990cbbdafrom master.
This commit is contained in:
@@ -64,6 +64,9 @@ class StaticLiveServerChecks(LiveServerBase):
|
||||
# app without having set the required STATIC_URL setting.")
|
||||
pass
|
||||
finally:
|
||||
# Use del to avoid decrementing the database thread sharing count a
|
||||
# second time.
|
||||
del cls.server_thread
|
||||
super().tearDownClass()
|
||||
|
||||
def test_test_test(self):
|
||||
|
||||
Reference in New Issue
Block a user