Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21207 closed Bug (fixed)

Test failure on Oracle: test_cursor_contextmanager

Reported by: Shai Berger Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Release blocker Keywords: oracle
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

On Oracle, we get:

======================================================================
ERROR: test_cursor_contextmanager (backends.tests.BackendTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/django/django/tests/backends/tests.py", line 627, in test_cursor_contextmanager
    cursor.execute("select 1")
  File "/home/django/django/django/db/backends/utils.py", line 61, in execute
    return self.cursor.execute(sql, params)
  File "/home/django/django/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/home/django/django/django/db/backends/utils.py", line 59, in execute
    return self.cursor.execute(sql)
  File "/home/django/django/django/db/backends/oracle/base.py", line 841, in execute
    self._guess_input_sizes([params])
  File "/home/django/django/django/db/backends/oracle/base.py", line 810, in _guess_input_sizes
    self.setinputsizes(*sizes)
InterfaceError: not open

Change History (3)

comment:1 by Anssi Kääriäinen, 11 years ago

This should be easy to fix - just set Oracle's features.closed_cursor_error_class to InterfaceError and things should work. Could you test that this fixes the issue on Oracle?

comment:2 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 0d02c5429970804068520f0dc6f0ae9fb3e08b9c:

Fixed #21207 -- Fixed test failure on Oracle: test_cursor_contextmanager

refs #17671

comment:3 by Shai Berger, 11 years ago

Thanks, guys.

Note: See TracTickets for help on using tickets.
Back to Top