Jan Wieck wieck at lists.slony.info
Tue May 15 07:05:17 PDT 2007
Update of /home/cvsd/slony1/slony1-engine/src/ducttape
In directory main.slony.info:/tmp/cvs-serv10192

Modified Files:
	compare_pgbench_dumps test_1_pgbench.in test_2_pgbench.in 
Log Message:
Adjust ducttape tests 1 and 2 for Slony-I 2.0 without
TABLE ADD KEY support. The other tests need adjustment
as well.

Jan


Index: test_2_pgbench.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_2_pgbench.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_2_pgbench.in	1 Jun 2006 12:35:52 -0000	1.2
--- test_2_pgbench.in	15 May 2007 14:05:15 -0000	1.3
***************
*** 32,36 ****
  DEBUG_LEVEL=2
  
! PGBENCH_SCALE=10
  PGBENCH_CLIENTS=5
  PGBENCH_TRANS=`expr 50000 / $PGBENCH_CLIENTS`
--- 32,36 ----
  DEBUG_LEVEL=2
  
! PGBENCH_SCALE=1
  PGBENCH_CLIENTS=5
  PGBENCH_TRANS=`expr 50000 / $PGBENCH_CLIENTS`
***************
*** 102,105 ****
--- 102,112 ----
  createdb $DB1 || exit -1
  pgbench -i -s $PGBENCH_SCALE $DB1
+ psql $DB1 <<_EOF_
+ 	create sequence history_seq;
+ 	alter table history add column seqno int8;
+ 	alter table history alter column seqno set default nextval('history_seq');
+ 	update history set seqno = nextval('history_seq') where seqno is null;
+ 	alter table history add primary key (seqno);
+ _EOF_
  pg_dump -s $DB1 >pgbench_schema.sql
  
***************
*** 152,162 ****
  
  	try {
- 		table add key (node id = 1, fully qualified name = 'public.history');
- 	}
- 	on error {
- 		exit -1;
- 	}
- 
- 	try {
  		create set (id = 1, origin = 1, comment = 'Set 1 - pgbench tables');
  		set add table (set id = 1, origin = 1,
--- 159,162 ----
***************
*** 171,175 ****
  		set add table (set id = 1, origin = 1,
  			id = 4, fully qualified name = 'public.history',
! 			key = serial, comment = 'Table accounts');
  	}
  	on error {
--- 171,175 ----
  		set add table (set id = 1, origin = 1,
  			id = 4, fully qualified name = 'public.history',
! 			comment = 'Table history');
  	}
  	on error {
***************
*** 301,305 ****
  	store path (server = 3, client = 2, conninfo = 'dbname=$DB3');
  
! 	echo 'Database $DB2 added as Node 2';
  _EOF_
  
--- 301,305 ----
  	store path (server = 3, client = 2, conninfo = 'dbname=$DB3');
  
! 	echo 'Database $DB3 added as Node 3';
  _EOF_
  

Index: test_1_pgbench.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_1_pgbench.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_1_pgbench.in	4 Jul 2005 23:45:21 -0000	1.1
--- test_1_pgbench.in	15 May 2007 14:05:15 -0000	1.2
***************
*** 89,92 ****
--- 89,99 ----
  createdb $DB1 || exit 1
  pgbench -i -s $PGBENCH_SCALE $DB1
+ psql $DB1 <<_EOF_
+ 	create sequence history_seq;
+ 	alter table history add column seqno int8;
+ 	alter table history alter column seqno set default nextval('history_seq');
+ 	update history set seqno = nextval('history_seq') where seqno is null;
+ 	alter table history add primary key (seqno);
+ _EOF_
  pg_dump -s $DB1 >pgbench_schema.sql
  
***************
*** 138,148 ****
  
  	try {
- 		table add key (node id = 11, fully qualified name = 'public.history');
- 	}
- 	on error {
- 		exit 1;
- 	}
- 
- 	try {
  		create set (id = 1, origin = 11, comment = 'Set 1 - pgbench tables');
  		set add table (set id = 1, origin = 11,
--- 145,148 ----
***************
*** 157,161 ****
  		set add table (set id = 1, origin = 11,
  			id = 4, fully qualified name = 'public.history',
! 			key = serial, comment = 'Table accounts');
  	}
  	on error {
--- 157,161 ----
  		set add table (set id = 1, origin = 11,
  			id = 4, fully qualified name = 'public.history',
! 			comment = 'Table history');
  	}
  	on error {

Index: compare_pgbench_dumps
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/compare_pgbench_dumps,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** compare_pgbench_dumps	27 Oct 2005 19:20:40 -0000	1.4
--- compare_pgbench_dumps	15 May 2007 14:05:15 -0000	1.5
***************
*** 17,21 ****
  			from tellers order by tid;
  	select 'history:'::text, tid, bid, aid, delta, mtime, filler,
! 			"_Slony-I_T1_rowID" from history order by "_Slony-I_T1_rowID";
  _EOF_
  psql -o dump.tmp.2.$$ $DB2 <<_EOF_
--- 17,21 ----
  			from tellers order by tid;
  	select 'history:'::text, tid, bid, aid, delta, mtime, filler,
! 			seqno from history order by seqno;
  _EOF_
  psql -o dump.tmp.2.$$ $DB2 <<_EOF_
***************
*** 27,31 ****
  			from tellers order by tid;
  	select 'history:'::text, tid, bid, aid, delta, mtime, filler,
! 			"_Slony-I_T1_rowID" from history order by "_Slony-I_T1_rowID";
  _EOF_
  
--- 27,31 ----
  			from tellers order by tid;
  	select 'history:'::text, tid, bid, aid, delta, mtime, filler,
! 			seqno from history order by seqno;
  _EOF_
  



More information about the Slony1-commit mailing list