Re: [Django] #14443: Oracle backend returns wrong test database name

2010-11-16 Thread Django
#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 
 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: 
Django 
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.



Re: [Django] #14443: Oracle backend returns wrong test database name

2010-10-11 Thread Django
#14443: Oracle backend returns wrong test database name
---+
  Reporter:  gruszczy  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

  * stage:  Unreviewed => Accepted

Comment:

 In the days when the 1.1 release was near there was some work in this area
 of the code. Please see changesets r10547 and r10608 and its associated
 ticket: #10716 (also, r8330 from the 1.0 development cycle). Note how some
 attempts to rationalize things that arose from simple code inspection had
 to be undone

 IMHO, certainly it would be helpful if somebody with a) access to a
 working Oracle setup, b) Oracle experience and c) time do dedicate to the
 task could make and test a holistic review and cleanup of the code. I can
 submit the resulting patch for review by the Oracle experts in the core
 development team and commit it if all goes ok.

 a) and b) are critical because AFAIK e.g. the Django test suite is running
 now under Oracle in these conditions and we don be the ones that break it,
 aren't we :)

-- 
Ticket URL: 
Django 
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.