mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-22 20:19:00 +00:00
Test that vmstatu runs for --run-time with --no-stalk.
This commit is contained in:
@@ -24,7 +24,7 @@ if ( !$dbh ) {
|
|||||||
plan skip_all => 'Cannot connect to sandbox master';
|
plan skip_all => 'Cannot connect to sandbox master';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
plan tests => 25;
|
plan tests => 26;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $cnf = "/tmp/12345/my.sandbox.cnf";
|
my $cnf = "/tmp/12345/my.sandbox.cnf";
|
||||||
@@ -263,6 +263,17 @@ is(
|
|||||||
"Not stalking, collect ran for --run-time"
|
"Not stalking, collect ran for --run-time"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my $vmstat = `which vmstat 2>/dev/null`;
|
||||||
|
SKIP: {
|
||||||
|
skip "vmstat is not installed", 1 unless $vmstat;
|
||||||
|
chomp(my $n=`awk '/[ ]*[0-9]/ { n += 1 } END { print n }' "$dest/nostalk-vmstat"`);
|
||||||
|
is(
|
||||||
|
$n,
|
||||||
|
"2",
|
||||||
|
"vmstat ran for --run-time seconds (bug 955860)"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
is(
|
is(
|
||||||
`cat $dest/nostalk-hostname`,
|
`cat $dest/nostalk-hostname`,
|
||||||
`hostname`,
|
`hostname`,
|
||||||
|
Reference in New Issue
Block a user