From a1f1168ab483f122d89810a0bb16f758312a03cc Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Mon, 23 Jul 2012 12:28:25 -0300 Subject: [PATCH] t/lib/MasterSlave.t: Check that recurse_to_slaves gets all three slaves, or give a diagnostic --- t/lib/MasterSlave.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/t/lib/MasterSlave.t b/t/lib/MasterSlave.t index cd32b1e1..8207bd1f 100644 --- a/t/lib/MasterSlave.t +++ b/t/lib/MasterSlave.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 51; +use Test::More tests => 52; use MasterSlave; use DSNParser; @@ -288,6 +288,12 @@ $ms->recurse_to_slaves( skip_callback => $skip_callback, }); +is( + scalar(@slaves), + 3, + "recurse to slaves finds all three slaves" +) or diag(Dumper(\@slaves)); + is_deeply( $ms->get_master_dsn( $slaves[0], undef, $dp ), { h => '127.0.0.1',