Tue Apr 28 14:48:21 PDT 2009
- Previous message: [Slony1-commit] slony1-engine/tests/test1 README
- Next message: [Slony1-commit] slony1-engine/tests/test1 generate_dml.sh
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/tests
In directory main.slony.info:/tmp/cvs-serv6415
Modified Files:
Tag: REL_2_0_STABLE
run_test.sh
Log Message:
Revise tests to NOT use poll_cluster to "wait until everything has
propagated according to sl_status" - instead, we use SYNC/WAIT FOR
EVENT, which submits an event against the origin, and then waits until
that specific event has propagated.
This means we're testing WAIT FOR EVENT a lot more stringently, and
allows tests to run a lot quicker in cases where it takes a while
for the nodes to decide they are instantaneously "in sync"
Index: run_test.sh
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/run_test.sh,v
retrieving revision 1.26.2.1
retrieving revision 1.26.2.2
diff -C2 -d -r1.26.2.1 -r1.26.2.2
*** run_test.sh 5 Jan 2009 22:04:08 -0000 1.26.2.1
--- run_test.sh 28 Apr 2009 21:48:19 -0000 1.26.2.2
***************
*** 628,644 ****
}
! wait_for_catchup()
! {
! node=1
! status "waiting for nodes to catch up"
! poll_cluster
! sleep 20
! poll_cluster
! status "done"
! }
diff_db()
{
--- 628,654 ----
}
! # wait_for_catchup()
! # {
! # node=1
! # status "waiting for nodes to catch up"
! # poll_cluster
! # sleep 20
! # poll_cluster
! # status "done"
! # }
+ wait_for_catchup ()
+ {
+ eval onode=${ORIGINNODE:-"1"}
+ status "submit SYNC to node ${onode}, wait for event to propagate to all nodes..."
+ echo "include <${mktmp}/slonik.preamble>;" > $mktmp/wait-for-propagation.slonik
+ echo "sync (ID=${onode});" >> $mktmp/wait-for-propagation.slonik
+ echo "wait for event (origin=${onode},confirmed=ALL,wait on=${onode});" >> $mktmp/wait-for-propagation.slonik
+ $pgbindir/slonik < $mktmp/wait-for-propagation.slonik > $mktmp/wait-for-propagation.log 2>&1
+ status "...event propagated to all nodes"
+ }
diff_db()
{
- Previous message: [Slony1-commit] slony1-engine/tests/test1 README
- Next message: [Slony1-commit] slony1-engine/tests/test1 generate_dml.sh
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list