schwern/test-more — Issue #251: Test::More should have a reliable Timeout option
Author: jjYBdx4IL
Created: 2012-01-28 23:34:11+00:00
State: open

See, for example, Socket/t/socketpair.t.

Like that author of that test, many authors are writing their own timeout handling to prevent stopping entire test suites because of a single, hanging test. Moreover, just setting an alarm seems not be enough. Would be great to have that feature directly provided by Test::More like:

use Test::More tests => 5, timeout => 30;

Maybe you can use Sys::SigAction::timeout_call for that purpose. (don't know if it always works during hanging I/O, but haven't had any experience showing otherwise).