testr should have a timeout option

Bug #1094396 reported by Monty Taylor
6
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.

Revision history for this message
Robert Collins (lifeless) wrote :

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).

Changed in testrepository:
status: New → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.