Jan Wieck wieck at lists.slony.info
Mon Jun 4 15:51:21 PDT 2007
Update of /home/cvsd/slony1/slony1-engine/src/ducttape
In directory main.slony.info:/tmp/cvs-serv31948/src/ducttape

Modified Files:
      Tag: REL_1_2_STABLE
	test_5_ddlscript test_5_pgbench.in 
Log Message:
Fixed EXECUTE SCRIPT with respect to WAIT FOR EVENT. It will
now record the scripts event seqno inside of slonik's conninfo
state so that WAIT FOR EVENT will wait for the right seqno.

Jan


Index: test_5_pgbench.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_5_pgbench.in,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** test_5_pgbench.in	1 Jun 2006 12:35:52 -0000	1.2
--- test_5_pgbench.in	4 Jun 2007 22:51:19 -0000	1.2.2.1
***************
*** 265,275 ****
  done
  echo "**** pgbench finished"
! echo "**** please terminate the replication engines when caught up."
! wait $slon1_pid
! wait $slon2_pid
  
  kill $pgbench_pid 2>/dev/null
- kill $slon1_pid 2>/dev/null
- kill $slon2_pid 2>/dev/null
  
  echo -n "**** comparing databases ... "
--- 265,286 ----
  done
  echo "**** pgbench finished"
! sleep 1
! 
! slonik <<_EOF_
! 	cluster name = T1;
! 	node 1 admin conninfo = 'dbname=$DB1';
! 	node 2 admin conninfo = 'dbname=$DB2';
! 
! 	echo '**** Issuing slonik SYNC against DB1';
! 	sync (id = 1);
! 
! 	echo '**** Waiting for DB2 to catch up';
! 	wait for event (origin = 1, confirmed = 2, wait on = 1);
! _EOF_
! 
! 
! echo "**** you can terminate the replication engines."
  
  kill $pgbench_pid 2>/dev/null
  
  echo -n "**** comparing databases ... "

Index: test_5_ddlscript
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_5_ddlscript,v
retrieving revision 1.2
retrieving revision 1.2.6.1
diff -C2 -d -r1.2 -r1.2.6.1
*** test_5_ddlscript	18 Jun 2004 20:22:01 -0000	1.2
--- test_5_ddlscript	4 Jun 2007 22:51:19 -0000	1.2.6.1
***************
*** 82,88 ****
--- 82,98 ----
  
  	try {
+ 		echo '  execute script';
  		execute script (set id = 1, filename = 'test_5_tmp.sql',
  			event node = 1);
+ 	}
+ 	on error {
+ 		exit 1;
+ 	}
+ 
+ 	echo '  wait for execute script';
+ 	wait for event (origin = 1, confirmed = 2);
  
+ 	try {
+ 		echo '  create temporary set 999';
  		create set (id = 999, origin = 1, comment = 'temp set for new objects');
  
***************
*** 99,102 ****
--- 109,116 ----
  		exit 1;
  	}
+ 
+ 	echo '  wait for create set &co';
+ 	wait for event (origin = 1, confirmed = all, wait on = 1);
+ 	echo '  temporary set 999 ready for subscription';
  _EOF_
  



More information about the Slony1-commit mailing list