Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#14921 closed (fixed)

Cannot run tests against oracle db on trunk

Reported by: Karen Tracey Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

After r14861, I cannot run tests using Oracle backend. I get:

Creating test database for alias 'default' ('test_XE')...
_create_test_db(): dbname = test_XE
CREATE TABLESPACE test_XE
               DATAFILE 'test_XE.dbf' SIZE 20M
               REUSE AUTOEXTEND ON NEXT 10M MAXSIZE 200M

CREATE TEMPORARY TABLESPACE test_XE_temp
               TEMPFILE 'test_XE_temp.dbf' SIZE 20M
               REUSE AUTOEXTEND ON NEXT 10M MAXSIZE 100M

Creating test user...
_create_test_user(): username = test_system
CREATE USER test_system
               IDENTIFIED BY Im_a_lumberjack
               DEFAULT TABLESPACE test_XE
               TEMPORARY TABLESPACE test_XE_temp

GRANT CONNECT, RESOURCE TO test_system
Traceback (most recent call last):
  File "runtests.py", line 314, in <module>
    failures = django_tests(int(options.verbosity), options.interactive, options.failfast, args)
  File "runtests.py", line 183, in django_tests
    failures = test_runner.run_tests(test_labels, extra_tests=extra_tests)
  File "C:\u\kmt\django\trunk\django\test\simple.py", line 362, in run_tests
    old_config = self.setup_databases()
  File "C:\u\kmt\django\trunk\django\test\simple.py", line 299, in setup_databases
    test_db_name = connection.creation.create_test_db(self.verbosity, autoclobber=not self.interactive)
  File "C:\u\kmt\django\trunk\django\db\backends\creation.py", line 355, in create_test_db
    self.connection.features.confirm()
  File "C:\u\kmt\django\trunk\django\db\backends\__init__.py", line 169, in confirm
    self.supports_transactions = self._supports_transactions()
  File "C:\u\kmt\django\trunk\django\db\backends\__init__.py", line 174, in _supports_transactions
    cursor = self.connection.cursor()
  File "C:\u\kmt\django\trunk\django\db\backends\__init__.py", line 77, in cursor
    cursor = self._cursor()
  File "C:\u\kmt\django\trunk\django\db\backends\oracle\base.py", line 407, in _cursor
    self.connection = Database.connect(conn_string, **conn_params)
cx_Oracle.DatabaseError: ORA-12154: TNS:could not resolve the connect identifier specified

Change History (3)

comment:1 by Karen Tracey, 13 years ago

Summary: Cannot connect to oracle db on trunkCannot run tests against oracle db on trunk

comment:2 by Ramiro Morales, 13 years ago

Resolution: fixed
Status: newclosed

(In [14993]) Fixed #14921 -- Tweak changes made in r14861 for the Oracle backend so the test runner can actually create the test DB. Thanks Karen for the report.

In Oracle, the name of a DB as handled by Django hasn't a counterpart anyway. So use the 'production DB name' as it was done before.

comment:3 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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