Test waitpid in t/pt-table-sync/pt-1194.t

This commit is contained in:
Sveta Smirnova
2024-11-29 01:51:12 +03:00
parent 6aacdda0e6
commit df2cc0c9ca

View File

@@ -10,6 +10,7 @@ use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
use English qw(-no_match_vars); use English qw(-no_match_vars);
use Test::More; use Test::More;
use POSIX ":sys_wait_h";
use PerconaTest; use PerconaTest;
use Sandbox; use Sandbox;
@@ -96,6 +97,9 @@ diag("OK 11\n");
kill -1, getpgrp($pid1); kill -1, getpgrp($pid1);
kill -1, getpgrp($pid2); kill -1, getpgrp($pid2);
1 while waitpid($pid1, WUNTRACED) > 0;
1 while waitpid($pid2, WNOHANG) > 0;
diag("OK 12\n"); diag("OK 12\n");
$replica1_dbh->do("STOP ${replica_name}"); $replica1_dbh->do("STOP ${replica_name}");
$ss = $ms->get_replica_status($replica1_dbh); $ss = $ms->get_replica_status($replica1_dbh);