mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 21:19:59 +00:00
t/pt-table-sync/triggers.t: Use wait_for_table and wait for both tables to replicate
This commit is contained in:
@@ -97,20 +97,11 @@ like(
|
|||||||
# #############################################################################
|
# #############################################################################
|
||||||
|
|
||||||
$sb->load_file('master', 't/pt-table-sync/samples/issue_367.sql');
|
$sb->load_file('master', 't/pt-table-sync/samples/issue_367.sql');
|
||||||
my $i = 0;
|
PerconaTest::wait_for_table(
|
||||||
PerconaTest::wait_until(
|
$slave_dbh,
|
||||||
sub {
|
"$_.t1",
|
||||||
my $r;
|
"id > 4"
|
||||||
eval {
|
) for qw( db1 db2 );
|
||||||
$r = $slave_dbh->selectrow_arrayref('SHOW TABLES FROM db1');
|
|
||||||
};
|
|
||||||
return 1 if ($r->[0] || '') eq 't1';
|
|
||||||
diag('Waiting for slave...') unless $i++;
|
|
||||||
return 0;
|
|
||||||
},
|
|
||||||
0.5,
|
|
||||||
30,
|
|
||||||
);
|
|
||||||
|
|
||||||
# Make slave db1.t1 and db2.t1 differ from master.
|
# Make slave db1.t1 and db2.t1 differ from master.
|
||||||
$slave_dbh->do('INSERT INTO db1.t1 VALUES (9)');
|
$slave_dbh->do('INSERT INTO db1.t1 VALUES (9)');
|
||||||
|
Reference in New Issue
Block a user