mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-12 06:00:14 +00:00
PT-2295 - Fix tests on distributions
- t/pt-archiver/pt-2064.t does not clean up innodb_lock_wait_timeout properly and breaks t/pt-config-diff/basics.t as a result - Added cleanup to t/pt-stalk/pt-stalk.t
This commit is contained in:
@@ -37,6 +37,9 @@ $sb->create_dbs($master_dbh, ['test']);
|
|||||||
$sb->load_file('master', 't/pt-archiver/samples/table1.sql');
|
$sb->load_file('master', 't/pt-archiver/samples/table1.sql');
|
||||||
$sb->wait_for_slaves();
|
$sb->wait_for_slaves();
|
||||||
|
|
||||||
|
my $old_innodb_lock_wait_timeout = `/tmp/12345/use -ss -e 'select \@\@global.innodb_lock_wait_timeout'`;
|
||||||
|
chomp $old_innodb_lock_wait_timeout;
|
||||||
|
|
||||||
$master_dbh->do('set global innodb_lock_wait_timeout=1');
|
$master_dbh->do('set global innodb_lock_wait_timeout=1');
|
||||||
|
|
||||||
$master_dbh->do('begin');
|
$master_dbh->do('begin');
|
||||||
@@ -59,7 +62,7 @@ unlike(
|
|||||||
# #############################################################################
|
# #############################################################################
|
||||||
# Done.
|
# Done.
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
$master_dbh->do('set global innodb_lock_wait_timeout=DEFAULT');
|
$master_dbh->do("set global innodb_lock_wait_timeout=$old_innodb_lock_wait_timeout");
|
||||||
|
|
||||||
$sb->wipe_clean($master_dbh);
|
$sb->wipe_clean($master_dbh);
|
||||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||||
|
@@ -993,8 +993,8 @@ SKIP: {
|
|||||||
# Done.
|
# Done.
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
|
|
||||||
|
|
||||||
cleanup();
|
cleanup();
|
||||||
diag(`rm -rf $dest 2>/dev/null`);
|
diag(`rm -rf $dest 2>/dev/null`);
|
||||||
|
$sb->wipe_clean($dbh);
|
||||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||||
done_testing;
|
done_testing;
|
||||||
|
Reference in New Issue
Block a user