Re: [Django] #17786: Exception when running the tests under Oracle

2012-02-29 Thread Django
#17786: Exception when running the tests under Oracle
---+--
 Reporter:  aaugustin  |Owner:  aaugustin
 Type:  Bug|   Status:  closed
Component:  Testing framework  |  Version:  1.4-beta-1
 Severity:  Release blocker|   Resolution:  fixed
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by akaariai):

 Now I know what bothers me about the self.settings_dict. From the code you
 get a feeling the settings_dict is instance level, or class level at most.
 However, you are really modifying the settings.py `DATABASES['alias']`
 dictionary. That makes it pretty easy to do accidental global changes if
 you start changing the self.settings_dict.

 Anyhow, the above isn't this ticket's problem. And I don't know if
 "fixing" the above is worth more than a comment anyways.

 I often hope the django.db.backends and especially the
 django.db.models.sql would have good README files explaining what is
 happening and why. I guess these would get accepted assuming somebody were
 to write the files...

-- 
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-updates@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] #17786: Exception when running the tests under Oracle

2012-02-28 Thread Django
#17786: Exception when running the tests under Oracle
---+--
 Reporter:  aaugustin  |Owner:  aaugustin
 Type:  Bug|   Status:  closed
Component:  Testing framework  |  Version:  1.4-beta-1
 Severity:  Release blocker|   Resolution:  fixed
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by aaugustin):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [17601]:
 {{{
 #!CommitTicketReference repository="" revision="17601"
 Fixed #17786 (again) -- Ensured destruction of test databases works under
 Oracle, even with multiple databases, after r17411.
 }}}

-- 
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-updates@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] #17786: Exception when running the tests under Oracle

2012-02-28 Thread Django
#17786: Exception when running the tests under Oracle
---+--
 Reporter:  aaugustin  |Owner:  aaugustin
 Type:  Bug|   Status:  reopened
Component:  Testing framework  |  Version:  1.4-beta-1
 Severity:  Release blocker|   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by aaugustin):

 I've run the `multiple_databases` tests under Oracle and everything seemed
 to behave properly.

-- 
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-updates@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] #17786: Exception when running the tests under Oracle

2012-02-28 Thread Django
#17786: Exception when running the tests under Oracle
---+--
 Reporter:  aaugustin  |Owner:  aaugustin
 Type:  Bug|   Status:  reopened
Component:  Testing framework  |  Version:  1.4-beta-1
 Severity:  Release blocker|   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by akaariai):

 That looks good to me.

 There is an assumption the settings_dict is shared between connections.
 So, I think it is safe to store per-alias data there. It might be worth it
 to put a small comment about this assumption in
 `django.db.backends.BaseDatabaseWrapper.__init__()`. I think the
 assumption has been there long before this patch, but still a small
 comment can't hurt anybody. This is just nitpicking, not any must-fix
 issue.

 Note that I haven't actually tested anything...

-- 
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-updates@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] #17786: Exception when running the tests under Oracle

2012-02-28 Thread Django
#17786: Exception when running the tests under Oracle
---+--
 Reporter:  aaugustin  |Owner:  aaugustin
 Type:  Bug|   Status:  reopened
Component:  Testing framework  |  Version:  1.4-beta-1
 Severity:  Release blocker|   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by aaugustin):

 Good catch. I think the patch I just attached is cleaner and works with
 multiple databases too. I'd appreciate a review before I commit something
 stupid again...

-- 
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-updates@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] #17786: Exception when running the tests under Oracle

2012-02-28 Thread Django
#17786: Exception when running the tests under Oracle
---+--
 Reporter:  aaugustin  |Owner:  aaugustin
 Type:  Bug|   Status:  reopened
Component:  Testing framework  |  Version:  1.4-beta-1
 Severity:  Release blocker|   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by akaariai):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I don't think the patch is correct. You can have multiple Oracle
 connections with different username and password. So, the dictionary must
 be:
 alias -> (username, password). Otherwise you will use the same username
 and password for all the connections, which can be incorrect.

-- 
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-updates@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] #17786: Exception when running the tests under Oracle

2012-02-28 Thread Django
#17786: Exception when running the tests under Oracle
---+--
 Reporter:  aaugustin  |Owner:  aaugustin
 Type:  Bug|   Status:  closed
Component:  Testing framework  |  Version:  1.4-beta-1
 Severity:  Release blocker|   Resolution:  fixed
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by aaugustin):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [17599]:
 {{{
 #!CommitTicketReference repository="" revision="17599"
 Fixed #17786 -- Exception when running the tests under Oracle, during the
 destruction of the test database.
 }}}

-- 
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-updates@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] #17786: Exception when running the tests under Oracle

2012-02-27 Thread Django
#17786: Exception when running the tests under Oracle
---+--
 Reporter:  aaugustin  |Owner:  aaugustin
 Type:  Bug|   Status:  new
Component:  Testing framework  |  Version:  1.4-beta-1
 Severity:  Release blocker|   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by aaugustin):

 * owner:  nobody => aaugustin
 * stage:  Unreviewed => Accepted


Comment:

 Yes, the problem has several solutions, it's mostly a matter of choosing
 the less ugly :)

 Assigning to myself since I have an Oracle setup where I can test this.

-- 
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-updates@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] #17786: Exception when running the tests under Oracle

2012-02-27 Thread Django
#17786: Exception when running the tests under Oracle
---+--
 Reporter:  aaugustin  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Testing framework  |  Version:  1.4-beta-1
 Severity:  Release blocker|   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by akaariai):

 * cc: anssi.kaariainen@… (added)


Comment:

 This is almost definitely connected to r17411. That patch caused the drop
 database code to use a new connection for dropping the database. The
 Oracle code expects the dropping to be done by the same connection.

 The right fix seems to be returning the "remember" dictionary from the
 _create_test_db(), and then again passing it to _destroy_test_db(). Or,
 you could get hacky and have a class level remember variable in the
 creation code, mapping connection alias to remember dictionary of that
 alias. It should work but as said, it is a little ugly... Even uglier is
 just assigning the creation from the old connection to the new temporary
 connection.

-- 
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-updates@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.



[Django] #17786: Exception when running the tests under Oracle

2012-02-27 Thread Django
#17786: Exception when running the tests under Oracle
-+
   Reporter:  aaugustin  |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Testing framework  |Version:  1.4-beta-1
   Severity:  Release blocker|   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 {{{
 Destroying test database for alias 'default'...
 Traceback (most recent call last):
   File "runtests.py", line 323, in 
 options.failfast, args)
   File "runtests.py", line 166, in django_tests
 failures = test_runner.run_tests(test_labels, extra_tests=extra_tests)
   File "/var/lib/jenkins/jobs/Django +
 Oracle/workspace/django/test/simple.py", line 383, in run_tests
 self.teardown_databases(old_config)
   File "/var/lib/jenkins/jobs/Django +
 Oracle/workspace/django/test/simple.py", line 351, in teardown_databases
 connection.creation.destroy_test_db(old_name, self.verbosity)
   File "/var/lib/jenkins/jobs/Django +
 Oracle/workspace/django/db/backends/creation.py", line 378, in
 destroy_test_db
 new_connection.creation._destroy_test_db(test_database_name,
 verbosity)
   File "/var/lib/jenkins/jobs/Django +
 Oracle/workspace/django/db/backends/oracle/creation.py", line 126, in
 _destroy_test_db
 self.connection.settings_dict["USER"] = self.remember['user']
 KeyError: 'user'
 }}}

 This could be to be a consequence of r17411.

-- 
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-updates@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.