mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 21:19:59 +00:00
t/lib/MasterSlave.t: Check that recurse_to_slaves gets all three slaves, or give a diagnostic
This commit is contained in:
@@ -9,7 +9,7 @@ BEGIN {
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings FATAL => 'all';
|
use warnings FATAL => 'all';
|
||||||
use English qw(-no_match_vars);
|
use English qw(-no_match_vars);
|
||||||
use Test::More tests => 51;
|
use Test::More tests => 52;
|
||||||
|
|
||||||
use MasterSlave;
|
use MasterSlave;
|
||||||
use DSNParser;
|
use DSNParser;
|
||||||
@@ -288,6 +288,12 @@ $ms->recurse_to_slaves(
|
|||||||
skip_callback => $skip_callback,
|
skip_callback => $skip_callback,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
is(
|
||||||
|
scalar(@slaves),
|
||||||
|
3,
|
||||||
|
"recurse to slaves finds all three slaves"
|
||||||
|
) or diag(Dumper(\@slaves));
|
||||||
|
|
||||||
is_deeply(
|
is_deeply(
|
||||||
$ms->get_master_dsn( $slaves[0], undef, $dp ),
|
$ms->get_master_dsn( $slaves[0], undef, $dp ),
|
||||||
{ h => '127.0.0.1',
|
{ h => '127.0.0.1',
|
||||||
|
Reference in New Issue
Block a user