Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21172 closed Bug (fixed)

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

Reported by: Louis-Dominique Dubeau Owned by: Unai Zalakain
Component: Testing framework Version: dev
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 by Unai Zalakain, 11 years ago

Cc: unai@… added
Owner: changed from nobody to Unai Zalakain
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 by Unai Zalakain, 11 years ago

Keywords: live server test server live wsgi added

comment:4 by Tim Graham, 11 years ago

Easy pickings: unset

comment:6 by Unai Zalakain, 11 years ago

Triage Stage: AcceptedReady for checkin

comment:7 by Unai Zalakain, 11 years ago

Triage Stage: Ready for checkinAccepted

comment:8 by loic84, 11 years ago

Triage Stage: AcceptedReady for checkin

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

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

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 by Anssi Kääriäinen <akaariai@…>, 11 years ago

In 3c10d1e64faeb67b41e7aa501b21252e357a4564:

Removed useless comment. Refs #21172

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