Wed Feb 7 11:16:05 PST 2007
- Previous message: [Slony1-commit] slony1-engine/tests/test1 README generate_dml.sh
- Next message: [Slony1-commit] slony1-engine/src/xxid Makefile
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/tests/test1 In directory main:/tmp/cvs-serv8189 Modified Files: Tag: REL_1_1_STABLE README generate_dml.sh Log Message: Add tests of functions generate_sync_event() and make_function_strict() Index: README =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/tests/test1/README,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** README 30 Nov 2005 17:35:23 -0000 1.1.2.1 --- README 7 Feb 2007 19:16:02 -0000 1.1.2.2 *************** *** 1,5 **** $Id$ ! ! test1 is a basic test that replication generally functions. It ! creates three simple tables as one replication set, and replicates them from one database to another. --- 1,31 ---- $Id$ ! ! test1 is a basic test that replication generally functions. ! ! It creates three simple tables as one replication set, and replicates them from one database to another. + + The three tables are of the three interesting types: + + 1. table1 has a formal primary key + + 2. table2 lacks a formal primary key, but has a candidate primary key + + 3. table3 has no candidate primary key; Slony-I is expected to + generate one on its own. + + It actually tries replicating a fourth table, which has an invalid + candidate primary key (columns not defined NOT NULL), which should + cause it to be rejected. That is done in a slonik TRY {} block. + + It also creates... + + 5. table5 which has columns of all sorts of vaguely esoteric types to + exercise that points, paths, bitmaps, mac addresses, and inet types + replicate properly. + + 6. It does a test of the function generate_sync_event() to make sure + that it works as expected + + 7. It does a test of make_function_strict(), a function used in + 'UPDATE FUNCTIONS' to change the xxidin() function to be STRICT. Index: generate_dml.sh =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/tests/test1/generate_dml.sh,v retrieving revision 1.4.2.4 retrieving revision 1.4.2.5 diff -C2 -d -r1.4.2.4 -r1.4.2.5 *** generate_dml.sh 6 Feb 2007 16:00:41 -0000 1.4.2.4 --- generate_dml.sh 7 Feb 2007 19:16:02 -0000 1.4.2.5 *************** *** 31,34 **** --- 31,35 ---- percent=`expr $j \* 5` status "$percent %" + GENDATA="$mktmp/generate.data" while : ; do txtalen=$(random_number 1 100) *************** *** 38,45 **** txtb=$(random_string ${txtblen}) txtb=`echo ${txtb} | sed -e "s/\\\\\\\/\\\\\\\\\\\\\\/g" -e "s/'/''/g"` ! GENDATA="$mktmp/generate.data" echo "INSERT INTO table1(data) VALUES ('${txta}');" >> $GENDATA echo "INSERT INTO table2(table1_id,data) SELECT id, '${txtb}' FROM table1 WHERE data='${txta}';" >> $GENDATA echo "INSERT INTO table3(table2_id) SELECT id FROM table2 WHERE data ='${txtb}';" >> $GENDATA if [ ${i} -ge ${numrows} ]; then break; --- 39,49 ---- txtb=$(random_string ${txtblen}) txtb=`echo ${txtb} | sed -e "s/\\\\\\\/\\\\\\\\\\\\\\/g" -e "s/'/''/g"` ! ra=$(random_number 1 9) ! rb=$(random_number 1 9) ! rc=$(random_number 1 9) echo "INSERT INTO table1(data) VALUES ('${txta}');" >> $GENDATA echo "INSERT INTO table2(table1_id,data) SELECT id, '${txtb}' FROM table1 WHERE data='${txta}';" >> $GENDATA echo "INSERT INTO table3(table2_id) SELECT id FROM table2 WHERE data ='${txtb}';" >> $GENDATA + echo "INSERT INTO table5(numcol,realcol,ptcol,pathcol,polycol,circcol,ipcol,maccol,bitcol) values ('${ra}${rb}.${rc}','${ra}.${rb}${rc}','(${ra},${rb})','((${ra},${ra}),(${rb},${rb}),(${rc},${rc}),(${ra},${rc}))','((${ra},${rb}),(${rc},${ra}),(${rb},${rc}),(${rc},${rb}))','<(${ra},${rb}),${rc}>','192.168.${ra}.${rb}${rc}','08:00:2d:0${ra}:0${rb}:0${rc}',X'${ra}${rb}${rc}');" >> $GENDATA if [ ${i} -ge ${numrows} ]; then break; *************** *** 59,65 **** do_initdata() { ! originnode=${ORIGINNODE:-"1"} eval db=\$DB${originnode} ! eval host=\$HOST${originnode} eval user=\$USER${originnode} eval port=\$PORT${originnode} --- 63,69 ---- do_initdata() { ! originnode=${ORIGINNODE:-"1"} eval db=\$DB${originnode} ! eval host=\$HOST${originnode} eval user=\$USER${originnode} eval port=\$PORT${originnode} *************** *** 78,81 **** --- 82,90 ---- warn 3 "generate_sync_event() failed - rc=${rc} see $mktmp/gensync.log* for details" fi + $pgbindir/psql -h $host -p $port -d $db -U $user -c "select \"_${CLUSTER1}\".make_function_strict('xxidin', '(cstring)');" 1> $mktmp/gensync.log.1 2> $mktmp/gensync.log + rc=$? + if [ $rc -ne 0 ]; then + warn 3 "make_function_strict('xxidin', '(cstring)') failed - rc=${rc} see $mktmp/gensync.log* for details" + fi status "done" }
- Previous message: [Slony1-commit] slony1-engine/tests/test1 README generate_dml.sh
- Next message: [Slony1-commit] slony1-engine/src/xxid Makefile
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list