PT-118 Updated tests for basics.t

This commit is contained in:
Carlos Salguero
2018-05-07 14:20:30 -03:00
parent 1a5fda2ee8
commit d17ce01318
6 changed files with 25 additions and 22 deletions

View File

@@ -660,10 +660,11 @@ my %checksum_result_col = (
errors => 1,
diffs => 2,
rows => 3,
chunks => 4,
skipped => 5,
time => 6,
table => 7,
diff_rows => 4,
chunks => 5,
skipped => 6,
time => 7,
table => 8,
);
sub count_checksum_results {
my ($output, $column, $table) = @_;

View File

@@ -696,10 +696,11 @@ my %checksum_result_col = (
errors => 1,
diffs => 2,
rows => 3,
chunks => 4,
skipped => 5,
time => 6,
table => 7,
diff_rows => 4,
chunks => 5,
skipped => 6,
time => 7,
table => 8,
);
sub count_checksum_results {
my ($output, $column, $table) = @_;

View File

@@ -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)"
);

View File

@@ -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

View File

@@ -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

View File

@@ -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