Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21172 closed Bug (fixed)

have LiveServerThread follow the semantics of threading.Thread.join()

Reported by: ldd Owned by: Unai Zalakain
Component: Testing framework Version: master
Severity: Normal Keywords: live server, test server, live wsgi
Cc: unai@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

File: django/test/testcases.py

The semantics of threading.Thread.join() are "wait for this thread to end" and nothing more.

However, LiveServerThread redefines these semantics to first cause this thread to end and then wait for this thread to end.

This harms reusability, because someone calling join() on this object would expect the regular semantics and not the Django-specific redefinition. I've encountered this bug in 1.5 but visual inspection of master shows that at the time of writing this ticket it is present there too.

Change History (10)

comment:1 Changed 3 years ago by Unai Zalakain

Cc: unai@… added
Needs documentation: unset
Needs tests: unset
Owner: changed from nobody to Unai Zalakain
Patch needs improvement: unset
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 Changed 3 years ago by Unai Zalakain

Keywords: live server test server live wsgi added

comment:4 Changed 3 years ago by Tim Graham

Easy pickings: unset

comment:6 Changed 3 years ago by Unai Zalakain

Triage Stage: AcceptedReady for checkin

comment:7 Changed 3 years ago by Unai Zalakain

Triage Stage: Ready for checkinAccepted

comment:8 Changed 3 years ago by loic84

Triage Stage: AcceptedReady for checkin

Other than the comment I left which can be addressed at commit time, LGTM.

comment:9 Changed 3 years ago by Anssi Kääriäinen <akaariai@…>

Resolution: fixed
Status: assignedclosed

In 1830f50493cae042dac11957af986b0fd84f889f:

Merge pull request #1743 from unaizalakain/ticket_21172

Fixed #21172 -- have LiveServerThread follow the semantics of threading.Thread.join()

comment:10 Changed 3 years ago by Anssi Kääriäinen <akaariai@…>

In 3c10d1e64faeb67b41e7aa501b21252e357a4564:

Removed useless comment. Refs #21172

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