mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 18:30:16 +00:00
update pt-stalk test so it works more reliably when passwordless login is set up, and so the cycle-count test is OK with nondeterminism of +/- 1 second
This commit is contained in:
@@ -41,7 +41,7 @@ diag(`rm -rf $dest 2>/dev/null`);
|
||||
# Test that it won't run if can't connect to MySQL.
|
||||
# ###########################################################################
|
||||
|
||||
my $retval = system("$trunk/bin/pt-stalk >$log_file 2>&1");
|
||||
my $retval = system("$trunk/bin/pt-stalk -- --no-defaults --protocol socket --socket /dev/null >$log_file 2>&1");
|
||||
my $output = `cat $log_file`;
|
||||
|
||||
like(
|
||||
@@ -148,10 +148,11 @@ like(
|
||||
"Collect triggered"
|
||||
);
|
||||
|
||||
# There is some nondeterminism here. Sometimes it'll run for 2 samples because
|
||||
# the samples may not be precisely 1 second apart.
|
||||
chomp($output = `cat $dest/*-df | grep -c '^TS'`);
|
||||
is(
|
||||
$output,
|
||||
2,
|
||||
ok(
|
||||
$output >= 1 && $output <= 2,
|
||||
"Collect ran for --run-time"
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user