mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #21202 -- Maintained atomicity when the server disconnects.
Thanks intgr for the report. This commit doesn't include a test because I don't know how to emulate a database disconnection in a cross-database compatible way. Also simplified a 'backends' test that was constrained by this problem.
This commit is contained in:
@@ -664,13 +664,6 @@ class BackendTestCase(TestCase):
|
||||
self.assertIsInstance(cursor, CursorWrapper)
|
||||
self.assertTrue(cursor.closed)
|
||||
|
||||
|
||||
class IsUsableTests(TransactionTestCase):
|
||||
# Avoid using a regular TestCase because Django really dislikes closing
|
||||
# the database connection inside a transaction at this point (#21202).
|
||||
|
||||
available_apps = []
|
||||
|
||||
# Unfortunately with sqlite3 the in-memory test database cannot be closed.
|
||||
@skipUnlessDBFeature('test_db_allows_multiple_connections')
|
||||
def test_is_usable_after_database_disconnects(self):
|
||||
|
||||
Reference in New Issue
Block a user