From 3bbd8c3e2eb2b16d96e12361c96a8dfc90000ed7 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Thu, 6 Aug 2015 19:37:10 -0400 Subject: [PATCH] Adjust makedelta test for new system --- t/10-makedelta.t | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/t/10-makedelta.t b/t/10-makedelta.t index 36ad5905a..042206acb 100644 --- a/t/10-makedelta.t +++ b/t/10-makedelta.t @@ -8,7 +8,7 @@ use strict; use warnings; use lib 't','.'; use DBD::Pg; -use Test::More tests => 50; +use Test::More tests => 51; use BucardoTesting; my $bct = BucardoTesting->new({ location => 'makedelta' }) or BAIL_OUT "Creation of BucardoTesting object failed\n"; @@ -62,7 +62,7 @@ ok $dbhX->do('LISTEN bucardo_syncdone_deltatest3'), # Start up Bucardo and wait for initial syncs to finish. ok $bct->restart_bucardo($dbhX), 'Bucardo should start'; ok $bct->wait_for_notice($dbhX, [qw( - bucardo_syncdone_deltatest1 + syncdone_deltatest1 )]), 'The deltatest1 sync finished'; # Should have no rows. @@ -73,12 +73,16 @@ ok $dbhA->do(q{INSERT INTO bucardo_test1 (id, data1) VALUES (1, 'foo')}), 'Insert a row into test1 on A'; $dbhA->commit; -## Bucardo will fire off deltatest2 itself ok $bct->wait_for_notice($dbhX, [qw( - bucardo_syncdone_deltatest1 - bucardo_syncdone_deltatest2 -)]), 'The deltatest1 and deltatest2 syncs have finished'; + syncdone_deltatest1 +)]), 'The deltatest1 sync has finished'; +## Bucardo will not fire off deltatest2 itself, so we kick it +$bct->ctl('bucardo kick sync deltatest2 0'); + +ok $bct->wait_for_notice($dbhX, [qw( + syncdone_deltatest2 +)]), 'The deltatest2 sync has finished'; # The row should be in A and B, as well as C! is_deeply $dbhB->selectall_arrayref( @@ -102,8 +106,8 @@ $dbhB->commit; $bct->ctl('bucardo kick sync deltatest2 0'); ok $bct->wait_for_notice($dbhX, [qw( - bucardo_syncdone_deltatest1 - bucardo_syncdone_deltatest2 + syncdone_deltatest1 + syncdone_deltatest2 )]), 'The deltatest1 and deltatest2 syncs finished'; is_deeply $dbhA->selectall_arrayref( @@ -120,7 +124,7 @@ ok $dbhA->do(q{INSERT INTO bucardo_test4 (id, data1) VALUES (3, 'foo')}), $dbhA->commit; ok $bct->wait_for_notice($dbhX, [qw( - bucardo_syncdone_deltatest1 + syncdone_deltatest1 )]), 'The deltatest1 sync finished'; # Kick off the second sync @@ -152,8 +156,8 @@ ok $dbhA->do(q{INSERT INTO bucardo_test2 (id, data1) VALUES (3, 'howdy')}), $dbhA->commit; ok $bct->wait_for_notice($dbhX, [qw( - bucardo_syncdone_deltatest1 - bucardo_syncdone_deltatest3 + syncdone_deltatest1 + syncdone_deltatest3 )]), 'Syncs deltatest1 and deltatest3 finished'; is_deeply $dbhB->selectall_arrayref( -- 2.39.5