Re: [Django] #33719: Running tests in parallel throws exceptions.

9 views
Skip to first unread message

Django

unread,
May 18, 2022, 4:35:18 AM5/18/22
to django-...@googlegroups.com
#33719: Running tests in parallel throws exceptions.
-----------------------------------+------------------------------------
Reporter: Pēteris Caune | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 4.1
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 Mariusz Felisiak):

It looks that `initializer` was change unintentionally, the following diff
fixed it for me:
{{{#!diff
diff --git a/django/test/runner.py b/django/test/runner.py
index fe30d2289b..77eb68fe65 100644
--- a/django/test/runner.py
+++ b/django/test/runner.py
@@ -496,7 +496,7 @@ class ParallelTestSuite(unittest.TestSuite):
counter = multiprocessing.Value(ctypes.c_int, 0)
pool = multiprocessing.Pool(
processes=self.processes,
- initializer=self.init_worker,
+ initializer=self.init_worker.__func__,
initargs=[
counter,
self.initial_settings,

}}}

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

Django

unread,
May 18, 2022, 5:53:06 AM5/18/22
to django-...@googlegroups.com
#33719: Running tests in parallel throws exceptions.
-----------------------------------+------------------------------------
Reporter: Pēteris Caune | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 4.1
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 Pēteris Caune):

The above change fixed the issue here for me as well.

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

Django

unread,
May 18, 2022, 7:30:51 AM5/18/22
to django-...@googlegroups.com
#33719: Running tests in parallel throws exceptions.
-------------------------------------+-------------------------------------
Reporter: Pēteris Caune | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned

Component: Testing framework | Version: 4.1
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
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: nobody => Mariusz Felisiak
* status: new => assigned


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

Django

unread,
May 18, 2022, 7:39:40 AM5/18/22
to django-...@googlegroups.com
#33719: Running tests in parallel throws exceptions.
-------------------------------------+-------------------------------------
Reporter: Pēteris Caune | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned
Component: Testing framework | Version: 4.1
Severity: Release blocker | 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 Mariusz Felisiak):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/15708 PR]

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

Django

unread,
May 19, 2022, 4:21:40 AM5/19/22
to django-...@googlegroups.com
#33719: Running tests in parallel throws exceptions.
-------------------------------------+-------------------------------------
Reporter: Pēteris Caune | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed

Component: Testing framework | Version: 4.1
Severity: Release blocker | Resolution: fixed

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 GitHub <noreply@…>):

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


Comment:

In [changeset:"41c4cb253c137edf5a96b7408ea55d57d6e0602a" 41c4cb2]:
{{{
#!CommitTicketReference repository=""
revision="41c4cb253c137edf5a96b7408ea55d57d6e0602a"
Fixed #33719 -- Fixed test command crash when running in parallel.

Thanks Pēteris Caune for the report.

Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33719#comment:8>

Django

unread,
May 19, 2022, 4:22:21 AM5/19/22
to django-...@googlegroups.com
#33719: Running tests in parallel throws exceptions.
-------------------------------------+-------------------------------------
Reporter: Pēteris Caune | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed
Component: Testing framework | Version: 4.1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"2dd646e935d5ffa2289deb24e2a9a753010eeb82" 2dd646e9]:
{{{
#!CommitTicketReference repository=""
revision="2dd646e935d5ffa2289deb24e2a9a753010eeb82"
[4.1.x] Fixed #33719 -- Fixed test command crash when running in parallel.

Thanks Pēteris Caune for the report.

Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.
Backport of 41c4cb253c137edf5a96b7408ea55d57d6e0602a from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33719#comment:9>

Reply all
Reply to author
Forward
0 new messages