~mauricio-stekl/percona-toolkit/pt-docs-percona-theme

« back to all changes in this revision

Viewing changes to t/lib/MasterSlave.t

  • Committer: Daniel Nichter
  • Date: 2011-08-22 16:45:09 UTC
  • Revision ID: daniel@percona.com-20110822164509-d8ulqbdym1gjkh24
Test bug 819421.  Cannot repro.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
use strict;
10
10
use warnings FATAL => 'all';
11
11
use English qw(-no_match_vars);
12
 
use Test::More tests => 39;
 
12
use Test::More tests => 42;
13
13
 
14
14
use MasterSlave;
15
15
use DSNParser;
343
343
   "Invalid repl thread type"
344
344
);
345
345
 
 
346
# ############################################################################
 
347
# Bug 819421: MasterSlave::is_replication_thread() doesn't match all
 
348
# Issue 1339: MasterSlave::is_replication_thread() doesn't match all
 
349
# ############################################################################
 
350
$query = {
 
351
   Id      => '7',
 
352
   User    => 'msandbox',
 
353
   Host    => 'localhost:53246',
 
354
   db      => 'NULL',
 
355
   Command => 'Binlog Dump',
 
356
   Time    => '1174',
 
357
   State   => 'Sending binlog event to slave',
 
358
   Info    => 'NULL',
 
359
},
 
360
 
 
361
ok(
 
362
   $ms->is_replication_thread($query, type=>'all'),
 
363
   'Explicit all matches binlog dump'
 
364
);
 
365
 
 
366
$query = {
 
367
   Id      => '7',
 
368
   User    => 'system user',
 
369
   Host    => '',
 
370
   db      => 'NULL',
 
371
   Command => 'Connect',
 
372
   Time    => '1174',
 
373
   State   => 'Waiting for master to send event',
 
374
   Info    => 'NULL',
 
375
};
 
376
 
 
377
ok(
 
378
   $ms->is_replication_thread($query, type=>'all'),
 
379
   'Explicit all matches slave io thread'
 
380
);
 
381
 
 
382
$query = {
 
383
   Id      => '7',
 
384
   User    => 'system user',
 
385
   Host    => '',
 
386
   db      => 'NULL',
 
387
   Command => 'Connect',
 
388
   Time    => '1174',
 
389
   State   => 'Has read all relay log; waiting for the slave I/O thread to update it',
 
390
   Info    => 'NULL',
 
391
};
 
392
 
 
393
ok(
 
394
   $ms->is_replication_thread($query, type=>'all'),
 
395
   'Explicit all matches slave sql thread'
 
396
);
 
397
 
346
398
# #############################################################################
347
399
# get_replication_filters()
348
400
# #############################################################################