[Django] #31168: Add ability to mark test as parallel unsafe

7 views
Skip to first unread message

Django

unread,
Jan 14, 2020, 11:37:47 AM1/14/20
to django-...@googlegroups.com
#31168: Add ability to mark test as parallel unsafe
---------------------------------------------+------------------------
Reporter: Stuart Axon | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: 3.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
I'd like to run use --parallel, but my website uses TreeBeard (via django
cms), where some operations fail due to a race condition under parallel
operation.

I don't see a fix any time soon in DCMS's future, but this can't be the
only library with a similar issue.


It would be good if I could mark a test as @parallel_unsafe so that the
rest of the tests could run in parallel, while all the parallel_unsafe
tests would be guaranteed to run one at a time.

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

Django

unread,
Jan 15, 2020, 2:11:02 AM1/15/20
to django-...@googlegroups.com
#31168: Add ability to mark test as parallel unsafe.
-----------------------------------+--------------------------------------

Reporter: Stuart Axon | Owner: nobody
Type: New feature | Status: closed
Component: Testing framework | Version: master
Severity: Normal | Resolution: wontfix

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 felixxm):

* status: new => closed
* version: 3.0 => master
* resolution: => wontfix


Comment:

You can [https://docs.djangoproject.com/en/3.0/topics/testing/advanced
/#enforce-running-test-classes-sequentially Enforce running test classes
sequentially]. I don't think that marking a single test as "parallel
unsafe" is necessary and doable.

--
Ticket URL: <https://code.djangoproject.com/ticket/31168#comment:1>

Reply all
Reply to author
Forward
0 new messages