mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-27 16:12:04 +00:00
Mini-overhaul pt-deadlock-logger: change --interval default from undef to 30, add --iterations, remove --print, add --quiet, use explicit --columns default, remove --collapse, change default --clear-deadlocks table to percona_schema.clear_deadlocks, refactor the code, use Cxn and Runtime, remove some global vars.
This commit is contained in:
@@ -22,9 +22,6 @@ my $dbh1 = $sb->get_dbh_for('master');
|
||||
if ( !$dbh1 ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
}
|
||||
else {
|
||||
plan tests => 4;
|
||||
}
|
||||
|
||||
my $output;
|
||||
my $cnf = "/tmp/12345/my.sandbox.cnf";
|
||||
@@ -39,7 +36,7 @@ $sb->create_dbs($dbh1, ['test']);
|
||||
|
||||
# The clear-deadlocks table comes and goes quickly so we can really
|
||||
# only search the debug output for evidence that it was created.
|
||||
$output = `PTDEBUG=1 $trunk/bin/pt-deadlock-logger F=$cnf,D=test --clear-deadlocks test.make_deadlock 2>&1`;
|
||||
$output = `PTDEBUG=1 $trunk/bin/pt-deadlock-logger F=$cnf,D=test --clear-deadlocks test.make_deadlock --iterations 1 2>&1`;
|
||||
like(
|
||||
$output,
|
||||
qr/INSERT INTO test.make_deadlock/,
|
||||
@@ -67,4 +64,4 @@ like(
|
||||
# #############################################################################
|
||||
$sb->wipe_clean($dbh1);
|
||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||
exit;
|
||||
done_testing;
|
||||
|
Reference in New Issue
Block a user