~percona-toolkit-dev/percona-toolkit/pt-table-sync-binlog-format-only-if-not-statement

« back to all changes in this revision

Viewing changes to t/pt-table-checksum/basics.t

Merge fix-skipped-chunks-bug-1011738.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
   plan skip_all => 'sakila database is not loaded';
43
43
}
44
44
else {
45
 
   plan tests => 36;
 
45
   plan tests => 38;
46
46
}
47
47
 
48
48
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
255
255
   "Oversize chunks are not errors"
256
256
);
257
257
 
 
258
# SKIPPED should be accurate if the first skipped chunk # > 1.
 
259
# https://bugs.launchpad.net/percona-toolkit/+bug/1011738
 
260
$output = output(
 
261
   sub { pt_table_checksum::main(@args,
 
262
      qw(-t osc.t --chunk-size 6 --chunk-size-limit 1)) },
 
263
   stderr => 1,
 
264
);
 
265
 
 
266
like(
 
267
   $output,
 
268
   qr/Skipping chunk 2/i,
 
269
   "Skipped chunk 2"
 
270
);
 
271
 
 
272
is(
 
273
   PerconaTest::count_checksum_results($output, 'skipped'),
 
274
   1,
 
275
   "Skipped 1 chunk (bug 1011738)"
 
276
) or diag($output);
 
277
 
258
278
# ############################################################################
259
279
# Check slave table row est. if doing doing 1=1 on master table.
260
280
# ############################################################################