Skip to content

Commit

Permalink
t/CMAETest/ConnectFail.pm: propagate non-test warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Gray committed Jul 30, 2015
1 parent 9110fe9 commit 0412e97
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions t/CMAETest/ConnectFail.pm
Expand Up @@ -19,7 +19,11 @@ sub run {
my $warn_called = 0;
local $SIG{__WARN__} = sub {
# like( $_[0], qr/^failed to connect to $bogus_server/);
$warn_called++;
if ( $_[0] =~ /^failed to connect to $bogus_server/ ) {
$warn_called++;
} else {
warn @_;
}
};

foreach my $i (1..50) {
Expand All @@ -43,4 +47,4 @@ sub run {
done_testing;
}

1;
1;

0 comments on commit 0412e97

Please sign in to comment.