#8138: Switch django tests to use transactions
----------------------------------------+-----------------------------------
Reporter: mremolt | Owner: nobody
Status: new | Milestone: post-1.0
Component: Testing framework | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
----------------------------------------+-----------------------------------
Comment (by kmtracey):
I updated the diff to reasonably current trunk level (it no longer needs
to include the loaddata change since that function was added to loaddata
in r8336). I get no failures with that diff and sqlite as the backend.
Couple of others I've tried:
MySQL/InnoDB -- I get a couple of failures in addition to the ones
"normally" seen in the test suite for that combo. First, the auth tests
that use the login() function defined in the test fail because it seems
the subsequent call doesn't see the session changes that were supposed to
be made by login(). Switching these tests to use the test client login
function makes the failures go away (as does using the file session
backend), so that may be one way to fix these, though I'd like to
understand it better. Second, some of the comment testcases are written
to assume pk's starting at 1 for posted comments. However on InnoDB
rolling back a transaction does not roll back the autoincrement sequence
numbers (see http://bugs.mysql.com/bug.php?id=6714, closed wontfix), so
when using rollback the comment testcases get a failure due to pk's not
getting assigned as expected. Not sure how to fix that one.
MySQL/MyISAM -- What's supposed to be happening here? Since transactions
aren't supported I think we continue to need to use the old way, but we
don't seem to with the current patch (multiple failures/errors I did not
look into because unless we're doing something to avoid the rollback use
in this case I don't see how it would work). Am I right in thinking we
need to somehow avoid trying the rollback approach for this combo?
Postgres, Oracle not tried yet. Running the old code on the machine where
I have Postgres (very old tired machine) took 8 hours (!) and Oracle (on a
different, but still not exactly peppy) machine in brief tests has seemed
slow as molassas so I may not have the horsepower required to track down
much on those backends.
--
Ticket URL: <http://code.djangoproject.com/ticket/8138#comment:17>
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---