AnyEvent-WebSocket-Client
view release on metacpan or search on metacpan
t/lib/Test2/Plugin/AnyEvent/Timeout.pm view on Meta::CPAN
a timeout and cause the test to bailout if it ran for more than 30
seconds. This is a L<Test2> plugin that does this without the
boilerplate.
=cut
sub import
{
return if defined $timeout;
$timeout = AnyEvent->timer(
after => 30,
cb => sub {
my $ctx = context();
$ctx->bail("Test exceeded timeout of 30s");
$ctx->release;
},
);
}
1;
( run in 1.428 second using v1.01-cache-2.11-cpan-49f99fa48dc )