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