mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #28498 -- Fixed test database creation with cx_Oracle 6.
This commit is contained in:
@@ -56,6 +56,7 @@ class SelectForUpdateTests(TransactionTestCase):
|
||||
|
||||
def end_blocking_transaction(self):
|
||||
# Roll back the blocking transaction.
|
||||
self.cursor.close()
|
||||
self.new_connection.rollback()
|
||||
self.new_connection.set_autocommit(True)
|
||||
|
||||
@@ -370,7 +371,10 @@ class SelectForUpdateTests(TransactionTestCase):
|
||||
finally:
|
||||
# This method is run in a separate thread. It uses its own
|
||||
# database connection. Close it without waiting for the GC.
|
||||
connection.close()
|
||||
# Connection cannot be closed on Oracle because cursor is still
|
||||
# open.
|
||||
if connection.vendor != 'oracle':
|
||||
connection.close()
|
||||
|
||||
status = []
|
||||
thread = threading.Thread(target=raw, kwargs={'status': status})
|
||||
|
||||
Reference in New Issue
Block a user