Make daemons spawned by test suite exit more reliably
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
A recurring problem with the test suite is that a twisted daemon does not exit correctly at the end of the test suite run.
I have a branch almost ready that makes the daemons run in the same process group as the tests, which allows PQM to kill the daemons with the rest of the test suite if it detects a test suite hang.
It is still possible for bugs to cause the daemons to remain running past the end of the suite though. The following is an idea for how to make things a little more robust:
1. create a pipe where the read end is opened by the daemon, and the write end is opened by the test suite. It may be necessary to pass the file descriptor number via the environment rather than command line arguments. It is important that the daemon does not keep the write end open.
2. the daemon listens on that file descriptor (Andrew suggested using twisted.
3. TacTestSetup.
In the case that the test suite is killed or exits, the OS will close all of its file descriptors automatically. This will cause the read ends of those pipes to hang up, telling those daemons to exit.
Changed in launchpad: | |
assignee: | nobody → spiv |
status: | Unconfirmed → Confirmed |
Changed in launchpad: | |
assignee: | spiv → nobody |
Maybe fix this at the same time as bug 1307.