#20387: Two tests for admin views fail under Oracle
---------------------------------+-------------------------------------
Reporter: aaugustin | Owner: aaugustin
Type: Bug | Status: assigned
Component: contrib.admin | Version: master
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):
Oracle doesn't provide `RELEASE SAVEPOINT`. (I hope you were sitting down
when you read that.)
This deficiency is reflected here:
https://github.com/django/django/commit/a4f1e48ddbc464ed0ccb9c305db721845db91d6b#L0R319.
Possible solutions include:
- Not counting savepoint-related statements in `assertNumQueries` —
there's some merit in this idea, as it would minimize test breakage in the
1.6 release, but it goes against the principle of least surprise.
- Executing a comment eg. `query.execute("-- RELEASE SAVEPOINT ...")`
under Oracle to keep the query counts identical on all backends,
- Adding an `implements_release_savepoint` feature, and make the expected
query count depend on that feature,
- Simply make it depend on `connection.vendor == 'oracle'`.
Thoughts?
I'm attaching a patch implementing the last solution, because I'm lazy.
--
Ticket URL: <https://code.djangoproject.com/ticket/20387#comment:3>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.