mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-22 02:39:04 +00:00
PT-118 Updated tests for basics.t
This commit is contained in:
@@ -656,14 +656,15 @@ sub test_bash_tool {
|
||||
}
|
||||
|
||||
my %checksum_result_col = (
|
||||
ts => 0,
|
||||
errors => 1,
|
||||
diffs => 2,
|
||||
rows => 3,
|
||||
chunks => 4,
|
||||
skipped => 5,
|
||||
time => 6,
|
||||
table => 7,
|
||||
ts => 0,
|
||||
errors => 1,
|
||||
diffs => 2,
|
||||
rows => 3,
|
||||
diff_rows => 4,
|
||||
chunks => 5,
|
||||
skipped => 6,
|
||||
time => 7,
|
||||
table => 8,
|
||||
);
|
||||
sub count_checksum_results {
|
||||
my ($output, $column, $table) = @_;
|
||||
|
||||
@@ -692,14 +692,15 @@ sub test_bash_tool {
|
||||
}
|
||||
|
||||
my %checksum_result_col = (
|
||||
ts => 0,
|
||||
errors => 1,
|
||||
diffs => 2,
|
||||
rows => 3,
|
||||
chunks => 4,
|
||||
skipped => 5,
|
||||
time => 6,
|
||||
table => 7,
|
||||
ts => 0,
|
||||
errors => 1,
|
||||
diffs => 2,
|
||||
rows => 3,
|
||||
diff_rows => 4,
|
||||
chunks => 5,
|
||||
skipped => 6,
|
||||
time => 7,
|
||||
table => 8,
|
||||
);
|
||||
sub count_checksum_results {
|
||||
my ($output, $column, $table) = @_;
|
||||
|
||||
@@ -73,7 +73,7 @@ ok(
|
||||
no_diff(
|
||||
sub { pt_table_checksum::main(@args) },
|
||||
"$sample/default-results-$sandbox_version.txt",
|
||||
post_pipe => 'awk \'{print $2 " " $3 " " $4 " " $6 " " $8}\'',
|
||||
post_pipe => 'awk \'{print $2 " " $3 " " $4 " " $7 " " $9}\'',
|
||||
),
|
||||
"Default checksum"
|
||||
);
|
||||
@@ -85,6 +85,7 @@ ok(
|
||||
# 2
|
||||
$row = $master_dbh->selectrow_arrayref("select count(*) from percona.checksums");
|
||||
my $max_chunks = $sandbox_version < '5.7' ? 60 : 100;
|
||||
|
||||
ok(
|
||||
$row->[0] > 25 && $row->[0] < $max_chunks,
|
||||
'Between 25 and 60 chunks'
|
||||
@@ -98,7 +99,7 @@ ok(
|
||||
no_diff(
|
||||
sub { pt_table_checksum::main(@args, qw(--chunk-time 0)) },
|
||||
"$sample/static-chunk-size-results-$sandbox_version.txt",
|
||||
post_pipe => 'awk \'{print $2 " " $3 " " $4 " " $5 " " $6 " " $8}\'',
|
||||
post_pipe => 'awk \'{print $2 " " $3 " " $4 " " $6 " " $7 " " $9}\'',
|
||||
),
|
||||
"Static chunk size (--chunk-time 0)"
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if all tables can be ...
|
||||
checksum ...
|
||||
ERRORS DIFFS ROWS CHUNKS SKIPPED TABLE
|
||||
0 0 142 10 0 test.ascii
|
||||
ERRORS DIFFS ROWS DIFF_ROWS CHUNKS TIME
|
||||
0 0 142 0 10 0.088
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if all tables be ...
|
||||
if all tables checksummed
|
||||
checksum ...
|
||||
ERRORS DIFFS ROWS SKIPPED TABLE
|
||||
0 0 0 0 mysql.columns_priv
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if all tables can be ...
|
||||
if all tables be checksummed
|
||||
checksum ...
|
||||
ERRORS DIFFS ROWS CHUNKS SKIPPED TABLE
|
||||
0 0 0 1 0 mysql.columns_priv
|
||||
|
||||
Reference in New Issue
Block a user