mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 03:19:07 +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.
|
# 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`;
|
my $output = `cat $log_file`;
|
||||||
|
|
||||||
like(
|
like(
|
||||||
@@ -148,10 +148,11 @@ like(
|
|||||||
"Collect triggered"
|
"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'`);
|
chomp($output = `cat $dest/*-df | grep -c '^TS'`);
|
||||||
is(
|
ok(
|
||||||
$output,
|
$output >= 1 && $output <= 2,
|
||||||
2,
|
|
||||||
"Collect ran for --run-time"
|
"Collect ran for --run-time"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user