#10831 closed (fixed)
Using autocommit transaction decorator with new-style TestCase can lead to incorrect DB commit
Reported by: | Sean Legassick | Owned by: | Karen Tracey |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The autocommit transaction decorator calls transaction.managed(False) which can under some circumstances cause a DB commit. Thus the managed function should be nop'd like the other transaction functions (see attached patch) to avoid unwanted commits whilst running new-style TestCase tests.
Attachments (1)
Change History (4)
by , 16 years ago
Attachment: | 10831-test-case-nops-out-transaction-managed-func.diff added |
---|
comment:1 by , 16 years ago
milestone: | → 1.1 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
(In [10621]) Fixed #10831 -- Prevented code running under a to-be-rolled-back test from calling commit via transaction.managed(False). Thanks seanl for report and patch.