mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-17 01:01:39 +08:00
Wait for slaves in pt-upgrade/rewrite_non_select.t to make it stable.
This commit is contained in:
@@ -33,8 +33,9 @@ else {
|
|||||||
plan tests => 5;
|
plan tests => 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sb->load_file('master', 't/pt-upgrade/samples/001/tables.sql');
|
|
||||||
$sb->load_file('master1', 't/pt-upgrade/samples/001/tables.sql');
|
$sb->load_file('master1', 't/pt-upgrade/samples/001/tables.sql');
|
||||||
|
$sb->load_file('master', 't/pt-upgrade/samples/001/tables.sql');
|
||||||
|
$sb->wait_for_slaves();
|
||||||
|
|
||||||
# Issue 747: Make mk-upgrade rewrite non-SELECT
|
# Issue 747: Make mk-upgrade rewrite non-SELECT
|
||||||
|
|
||||||
@@ -43,8 +44,9 @@ my $cmd = "$trunk/bin/pt-upgrade h=127.1,P=12345 P=12348 -u msandbox -p msandbox
|
|||||||
my $c1 = $dbh1->selectrow_arrayref('checksum table test.t')->[1];
|
my $c1 = $dbh1->selectrow_arrayref('checksum table test.t')->[1];
|
||||||
my $c2 = $dbh2->selectrow_arrayref('checksum table test.t')->[1];
|
my $c2 = $dbh2->selectrow_arrayref('checksum table test.t')->[1];
|
||||||
|
|
||||||
ok(
|
is(
|
||||||
$c1 == $c2,
|
$c1,
|
||||||
|
$c2,
|
||||||
'Table checksums identical'
|
'Table checksums identical'
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -59,13 +61,15 @@ ok(
|
|||||||
my $c1_after = $dbh1->selectrow_arrayref('checksum table test.t')->[1];
|
my $c1_after = $dbh1->selectrow_arrayref('checksum table test.t')->[1];
|
||||||
my $c2_after = $dbh2->selectrow_arrayref('checksum table test.t')->[1];
|
my $c2_after = $dbh2->selectrow_arrayref('checksum table test.t')->[1];
|
||||||
|
|
||||||
ok(
|
is(
|
||||||
$c1_after == $c1,
|
$c1_after,
|
||||||
|
$c1,
|
||||||
'Table on host1 not changed'
|
'Table on host1 not changed'
|
||||||
);
|
);
|
||||||
|
|
||||||
ok(
|
is(
|
||||||
$c2_after == $c2,
|
$c2_after,
|
||||||
|
$c2,
|
||||||
'Table on host2 not changed'
|
'Table on host2 not changed'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user