Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#28790 closed Cleanup/optimization (fixed)

Document how to avoid running certain test classes in parallel

Reported by: Tobias Krönke Owned by: Caio Ariede
Component: Documentation Version: dev
Severity: Normal 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 (last modified by Tobias Krönke)

In PR https://github.com/django/django/pull/9342 I propose to enable users to mark tests for non-parallel execution. In this way, they don't have to make sure, that all their tests are properly isolated. This is useful, if you work with other external storages like e.g. solr and django-haystack.

Change History (11)

comment:1 by Tobias Krönke, 7 years ago

Description: modified (diff)

comment:2 by Tobias Krönke, 7 years ago

Description: modified (diff)

comment:3 by Tim Graham, 7 years ago

Isn't this is already provided by ba813864870d63de1d1679271c38a3c15e94e934? It could probably be documented if needed.

comment:4 by Tobias Krönke, 7 years ago

I don't want to be too eager for this to be merged. I probably wouldn't have looked any further had I known this Mixin. Still I would like to point out some advantages of my solution:

  • Less complex to use
  • Less complex implementation (especially no lock files involved)
  • More efficient, if you have only 1 shared resource (no concurrent waits for the locked file)

Of course I also see the advantage of the existing mixin, that you can use different lock files for different shared resources if you have many. A hint in the docs would be quite pleasant.

So, your call ;-)

comment:5 by Tim Graham, 7 years ago

Component: Testing frameworkDocumentation
Has patch: unset
Summary: Provide a mixin to run certain test classes not in parallelDocument how to avoid running certain test classes in parallel
Triage Stage: UnreviewedAccepted
Type: New featureCleanup/optimization

I guess it's better to document the existing class rather than add another one unless the new implementation is preferred for some reason.

comment:6 by Caio Ariede, 5 years ago

Owner: changed from nobody to Caio Ariede
Status: newassigned

comment:7 by Caio Ariede, 5 years ago

Version 0, edited 5 years ago by Caio Ariede (next)

comment:8 by Mariusz Felisiak, 5 years ago

Has patch: set

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In dafdfd6a:

Fixed #28790 -- Doc'd how to avoid running certain test classes in parallel.

comment:10 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 7d8d2b56:

[3.0.x] Fixed #28790 -- Doc'd how to avoid running certain test classes in parallel.

Backport of dafdfd6a60638c4edcca7c4e65d11c0af654d759 from master

comment:11 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 5e91adc7:

[2.2.x] Fixed #28790 -- Doc'd how to avoid running certain test classes in parallel.

Backport of dafdfd6a60638c4edcca7c4e65d11c0af654d759 from master

Note: See TracTickets for help on using tickets.
Back to Top