testr should have a timeout option
Bug #1094396 reported by
Monty Taylor
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Testrepository |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Sometimes, people write bad tests, and they completely spin out of control. To combat this, having a --timeout=X option would allow testrepository to abort the subprocess(s) it's running when it's clearly not doing anything anymore.
To post a comment you must log in.
There are two ways to do this, I think, one could teach the multiplexing testresult in testtools to kill the thread in question (and perhaps even implement the timeout logic there), or we could just close the input fd and assume that everything will tidy up at least within testr properly. The latter is likely easiest: when we receivce from a thread, write a liveness check to a globally visible variable, add a new watchdog thread that just checks those liveness values and closes the matching fd if broken. (And handles exceptions within itself gracefully).