diff --git a/t/pt-table-sync/issue_616.t b/t/pt-table-sync/issue_616.t index 790b5c48..0651b56f 100644 --- a/t/pt-table-sync/issue_616.t +++ b/t/pt-table-sync/issue_616.t @@ -31,16 +31,20 @@ else { plan tests => 3; } -$sb->wipe_clean($master_dbh); -$sb->wipe_clean($slave_dbh); -$sb->create_dbs($master_dbh, [qw(test)]); - # ############################################################################# # Issue 616: mk-table-sync inserts NULL values instead of correct values # ############################################################################# -diag(`/tmp/12345/use -D test < $trunk/t/lib/samples/issue_616.sql`); -sleep 1; -`$trunk/bin/pt-table-sync --sync-to-master h=127.1,P=12346,u=msandbox,p=msandbox --databases issue_616 --execute`; + +$sb->load_file('master', "t/lib/samples/issue_616.sql"); + +output( + sub { pt_table_sync::main("h=127.1,P=12346,u=msandbox,p=msandbox", + qw(--sync-to-master --databases issue_616 --execute)); + }, +); + +$sb->wait_for_slaves(); + my $ok_r = [ [ 1, 'from master' ], [ 11, 'from master' ], @@ -68,6 +72,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); -$sb->wipe_clean($slave_dbh); ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_634.t b/t/pt-table-sync/issue_634.t index b4b9e270..1fdd00fd 100644 --- a/t/pt-table-sync/issue_634.t +++ b/t/pt-table-sync/issue_634.t @@ -31,9 +31,6 @@ else { plan tests => 4; } -$sb->wipe_clean($master_dbh); -$sb->create_dbs($master_dbh, [qw(test)]); - # ############################################################################# # Issue 634: Cannot nibble table because MySQL chose no index # ############################################################################# @@ -46,6 +43,7 @@ $output = output( }, stderr => 1, ); +$sb->wait_for_slaves(); like( $output, diff --git a/t/pt-upgrade/rewrite_non_select.t b/t/pt-upgrade/rewrite_non_select.t index 4113ecfc..f296dddc 100644 --- a/t/pt-upgrade/rewrite_non_select.t +++ b/t/pt-upgrade/rewrite_non_select.t @@ -35,7 +35,6 @@ else { $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