mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-17 17:27:57 +00:00
pt-fifo-split: Fix for the blocking tests
This commit is contained in:
@@ -41,8 +41,14 @@ my @fifo;
|
||||
while (kill 0, $pid) {
|
||||
if ( -e $fifo ) {
|
||||
eval {
|
||||
local $SIG{ALRM} = sub { die "read timeout" };
|
||||
alarm 3;
|
||||
my $contents = slurp_file($fifo);
|
||||
push @fifo, $contents;
|
||||
alarm 0;
|
||||
};
|
||||
if (my $e = $@) {
|
||||
die $e unless $e =~ /\Aread timeout\z/;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,8 +78,14 @@ PerconaTest::wait_until(sub { -p $fifo });
|
||||
while (kill 0, $pid) {
|
||||
if ( -e $fifo ) {
|
||||
eval {
|
||||
local $SIG{ALRM} = sub { die "read timeout" };
|
||||
alarm 3;
|
||||
my $contents = slurp_file($fifo);
|
||||
push @fifo, $contents;
|
||||
alarm 0;
|
||||
};
|
||||
if (my $e = $@) {
|
||||
die $e unless $e =~ /\Aread timeout\z/;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user