On Wed, Jan 29, 2014 at 6:50 AM, Todd Rinaldo <to...@cpanel.net> wrote:
> I’m looking at using TAP::Harness to process our test suite. Up to now > we’ve been using some home grown code that IMHO is a heroic attempt to > re-implement TAP::Harness. > > It seems to do everything we need with one exception. We have rules that > disallow a unit test from taking more than XXX seconds to run. If it > exceeds that, we abort the test and move on to the next one, declaring the > long test file a failure. Before I look at subclassing, can anyone tell me > if there’s a way to do this with the existing code? > I don't think there's a clean way of doing that. You could hack something up with alarm, but that wouldn't work well with parallelization (or multi-threading for that matter). Another possibly route is subclassing TAP::Parser::Iterator::Process to use a timeout (not that IO::Select makes it easy to do that correctly, given crappy error signaling), and you'd have to do the same in TAP::Parser::Multiplexer if you want parallelization. Leon