#14443: Oracle backend returns wrong test database name ---------------------------------------------------+------------------------ Reporter: gruszczy | Owner: nobody Status: closed | Milestone: Component: Database layer (models, ORM) | Version: SVN Resolution: wontfix | Keywords: Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------------------------+------------------------ Changes (by ramiro):
* status: new => closed * resolution: => wontfix Comment: After learning a bit about how the Oracle backend handles the test environment preparation, I've found this: * The backend implements its own tablespace-based scheme (not a database- based one) so the value returned by `DatabaseCreation._create_test_db()` isn't really the one used to create/remove any test database like is done by the other Django DB backends. For more details please refer to the wiki:OracleTestSetup document (''Understanding the database test setup'' section.) * This changes actually breaks test environment setup, because the backend actually tries to connect to the DB returned by this method: {{{ Creating test database 'default'... Creating test user... Creating test database 'other'... Creating test user... 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 "django/final/django/test/simple.py", line 276, in run_tests old_config = self.setup_databases() File "django/final/django/test/simple.py", line 232, in setup_databases connection.creation.create_test_db(self.verbosity, autoclobber=not self.interactive) File "django/final/django/db/backends/creation.py", line 352, in create_test_db self.connection.features.confirm() File "django/final/django/db/backends/__init__.py", line 169, in confirm self.supports_transactions = self._supports_transactions() File "django/final/django/db/backends/__init__.py", line 174, in _supports_transactions cursor = self.connection.cursor() File "django/final/django/db/backends/__init__.py", line 77, in cursor cursor = self._cursor() File "django/final/django/db/backends/oracle/base.py", line 367, in _cursor self.connection = Database.connect(conn_string, **self.settings_dict['OPTIONS']) cx_Oracle.DatabaseError: ORA-12154: TNS:could not resolve the connect identifier specified }}} So, I'm going to close this ticket, please reopen it if you further Oracle and Oracle backend hindsight and can implement the proposed change but accompanied by others so the above breakage doesn't happen. -- Ticket URL: <http://code.djangoproject.com/ticket/14443#comment:3> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.