diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2017-08-16 18:39:58 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2017-08-16 18:42:41 +0200 |
| commit | 07e34f8bca83704e4c3d50830574a839354d9bcc (patch) | |
| tree | eff0446ecfccc8520d82111f5412a1e9020b1477 /tests | |
| parent | 1214e7c1b1248a7e51dfbdaaaed5bca56956f218 (diff) | |
[1.11.x] Fixed #28498 -- Fixed test database creation with cx_Oracle 6.
Backport of 6784383e93d582f43f8cb5f7647a05645cbb339b from master
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/select_for_update/tests.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/select_for_update/tests.py b/tests/select_for_update/tests.py index 9e5ee598b0..3344e3dcf3 100644 --- a/tests/select_for_update/tests.py +++ b/tests/select_for_update/tests.py @@ -51,6 +51,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) @@ -274,7 +275,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}) |
