Re: [Django] #33633: Some test_utils tests fail on databases that don't support transactions.

0 views
Skip to first unread message

Django

unread,
Apr 12, 2022, 12:43:17 AM4/12/22
to django-...@googlegroups.com
#33633: Some test_utils tests fail on databases that don't support transactions.
--------------------------------------+------------------------------------
Reporter: Xiang Zhang | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: 4.0
Severity: Normal | 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 Xiang Zhang):

Replying to [comment:2 Mariusz Felisiak]:
> Thanks for the report. I was able to reproduce even more failures:
> {{{
> ERROR: test_failure_in_setUpTestData_should_rollback_transaction
(test_utils.tests.TestBadSetUpTestData)
> FAIL: test_reset_sequences (test_utils.test_testcase.TestTestCase)
> FAIL: test_class_attribute_identity
(test_utils.test_testcase.TestDataTests)
> FAIL: test_execute (test_utils.tests.CaptureOnCommitCallbacksTests)
> FAIL: test_execute_recursive
(test_utils.tests.CaptureOnCommitCallbacksTests)
> FAIL: test_execute_tree (test_utils.tests.CaptureOnCommitCallbacksTests)
> FAIL: test_no_arguments (test_utils.tests.CaptureOnCommitCallbacksTests)
> FAIL: test_pre_callback (test_utils.tests.CaptureOnCommitCallbacksTests)
> FAIL: test_using (test_utils.tests.CaptureOnCommitCallbacksTests)
> }}}
>
> `CaptureOnCommitCallbacksTests` should be skipped on databases that
don't support transactions, i.e. decorated with
`@skipUnlessDBFeature("supports_transactions")`. I didn't check other
failures. Would you like to prepare a patch?

Yes. I also find more tests fail but for me the three are most important.
Let me submit a fix.

--
Ticket URL: <https://code.djangoproject.com/ticket/33633#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 12, 2022, 2:31:54 AM4/12/22
to django-...@googlegroups.com
#33633: Some test_utils tests fail on databases that don't support transactions.
-------------------------------------+-------------------------------------
Reporter: Xiang Zhang | Owner: Xiang
Type: | Zhang
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: 4.0
Severity: Normal | 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 Mariusz Felisiak):

* owner: nobody => Xiang Zhang
* status: new => assigned


Comment:

> Yes. I also find more tests fail but for me the three are most
important. Let me submit a fix.

Great, thanks.

--
Ticket URL: <https://code.djangoproject.com/ticket/33633#comment:4>

Django

unread,
Apr 12, 2022, 5:00:17 AM4/12/22
to django-...@googlegroups.com
#33633: Some test_utils tests fail on databases that don't support transactions.
-------------------------------------+-------------------------------------
Reporter: Xiang Zhang | Owner: Xiang
Type: | Zhang
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Xiang Zhang):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/15582

--
Ticket URL: <https://code.djangoproject.com/ticket/33633#comment:5>

Django

unread,
Apr 12, 2022, 6:37:06 AM4/12/22
to django-...@googlegroups.com
#33633: Some test_utils tests fail on databases that don't support transactions.
-------------------------------------+-------------------------------------
Reporter: Xiang Zhang | Owner: Xiang
Type: | Zhang
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/33633#comment:6>

Django

unread,
Apr 12, 2022, 9:36:05 AM4/12/22
to django-...@googlegroups.com
#33633: Some test_utils tests fail on databases that don't support transactions.
-------------------------------------+-------------------------------------
Reporter: Xiang Zhang | Owner: Xiang
Type: | Zhang
Cleanup/optimization | Status: closed

Component: Core (Other) | Version: 4.0
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"1bb9bd972424771246022bcf2c61e0eb87a0f337" 1bb9bd97]:
{{{
#!CommitTicketReference repository=""
revision="1bb9bd972424771246022bcf2c61e0eb87a0f337"
Fixed #33633 -- Skipped some test_utils tests on databases that don't
support transactions.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33633#comment:7>

Reply all
Reply to author
Forward
0 new messages