Opened 4 years ago

Last modified 4 years ago

#27079 assigned Bug

Refactor LiveServerPort.test_port_bind() not to call setUpClass() twice

Reported by: Chris Jerdonek Owned by: Chris Jerdonek
Component: Testing framework Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Currently, LiveServerPort.test_port_bind() calls LiveServerTestCase.setUpClass() and LiveServerTestCase.tearDownClass() twice (to create two live server threads -- see here for the code). On the tear-down side, this has the unwanted side effect of setting conn.allow_thread_sharing to False before all live server threads are done with their connections.

The test should really only be calling the full setUpClass() and tearDownClass() once (but still doing the partial setup and tear-down that it needs for the purposes of its test).

Change History (3)

comment:1 Changed 4 years ago by Tim Graham

Component: UncategorizedTesting framework
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

comment:2 Changed 4 years ago by Chris Jerdonek

Owner: changed from nobody to Chris Jerdonek
Status: newassigned

comment:3 Changed 4 years ago by Chris Jerdonek

Summary: LiveServerPort.test_port_bind() sets allow_thread_sharing to False before all server threads are doneRefactor LiveServerPort.test_port_bind() not to call setUpClass() twice

This merged pull request removed calling tearDownClass() twice (because it blocked the resolution of that issue), so I'm retitling this ticket to reflect the updated situation.

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