CVS User Account cvsuser
Mon Jan 9 12:16:47 PST 2006
Log Message:
-----------
Test bed - more port fixes per Seneca Cunningham

Found a few more places where we need to specify port numbers in order
to run tests across multiple postmasters.

Modified Files:
--------------
    slony1-engine/tests:
        run_test.sh (r1.7 -> r1.8)
        support_funcs.sh (r1.2 -> r1.3)

-------------- next part --------------
Index: support_funcs.sh
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tests/support_funcs.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -Ltests/support_funcs.sh -Ltests/support_funcs.sh -u -w -r1.2 -r1.3
--- tests/support_funcs.sh
+++ tests/support_funcs.sh
@@ -105,10 +105,11 @@
     eval odb=\$DB${originnode}
     eval ohost=\$HOST${originnode}
     eval ouser=\$USER${originnode}
+    eval oport=\$PORT${originnode}
     eval _upperbound=${_upperbound}    
     eval _lowerbound=${_lowerbound}
     eval opath=\$PGBINDIR${originnode}
-    rannum=`${opath}/psql -c "SELECT round(random()* ${_upperbound} + ${_lowerbound});" -t -A -h ${ohost} ${odb} ${ouser}`
+    rannum=`${opath}/psql -c "SELECT round(random()* ${_upperbound} + ${_lowerbound});" -t -A -h ${ohost} -p ${oport} -d ${odb} -U ${ouser}`
   ;;
   esac
   echo ${rannum}
@@ -136,10 +137,11 @@
     eval odb=\$DB${originnode}
     eval ohost=\$HOST${originnode}
     eval ouser=\$USER${originnode}
+    eval oport=\$PORT${originnode}
     eval opath=\$PGBINDIR${originnode}
     alias=${_length}
     while : ; do
-      ranstring=${ranstring}`${opath}/psql -c "SELECT chr(round(random()*((122-48))+48)::int4);" -t -A -h ${ohost} ${odb} ${ouser}`
+      ranstring=${ranstring}`${opath}/psql -c "SELECT chr(round(random()*((122-48))+48)::int4);" -t -A -h ${ohost} -p ${oport} -d ${odb} -U ${ouser}`
       if [ ${alias} -ge ${_length} ]; then
         break;
       else
@@ -174,9 +176,10 @@
     eval odb=\$DB${originnode}
     eval ohost=\$HOST${originnode}
     eval ouser=\$USER${originnode}
+    eval oport=\$PORT${originnode}
     alias=${_length}
     while : ; do
-      ranstring=${ranstring}`psql -c "SELECT chr(round(random()*(((122)-97))+97)::int4);" -t -A -h ${ohost} ${odb} ${ouser}`
+      ranstring=${ranstring}`psql -c "SELECT chr(round(random()*(((122)-97))+97)::int4);" -t -A -h ${ohost} -p ${oport} -d ${odb} -U ${ouser}`
       if [ ${alias} -ge ${_length} ]; then
         break;
       else
Index: run_test.sh
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tests/run_test.sh,v
retrieving revision 1.7
retrieving revision 1.8
diff -Ltests/run_test.sh -Ltests/run_test.sh -u -w -r1.7 -r1.8
--- tests/run_test.sh
+++ tests/run_test.sh
@@ -165,15 +165,17 @@
   eval odb=\$DB${originnode}
   eval ohost=\$HOST${originnode}
   eval ouser=\$USER${originnode}
+  eval oport=\$PORT${originnode}
 
-  if [ -n "${odb}" -a "${ohost}" -a "${ouser}" ]; then
+  if [ -n "${odb}" -a "${ohost}" -a "${ouser}" -a "${oport}" ]; then
     alias=1
     while : ; do
       eval db=\$DB${alias}
       eval host=\$HOST${alias}
       eval user=\$USER${alias}
+      eval port=\$PORT${alias}
 
-      if [ -n "${db}" -a "${host}" -a "${user}" ]; then
+      if [ -n "${db}" -a "${host}" -a "${user}" -a "${port}" ]; then
         if [ ${alias} -ne ${originnode} ]; then
           echo "STORE NODE (id=${alias}, comment='node ${alias}');" >> $mktmp/slonik.script
         fi
@@ -198,16 +200,18 @@
     eval db=\$DB${i}
     eval host=\$HOST${i}
     eval user=\$USER${i}
+    eval port=\$PORT${i}
 
-    if [ -n "${db}" -a "${host}" -a "${user}" ]; then
+    if [ -n "${db}" -a "${host}" -a "${user}" -a "${port}" ]; then
       j=1
       while : ; do
         if [ ${i} -ne ${j} ]; then
           eval bdb=\$DB${j}
           eval bhost=\$HOST${j}
           eval buser=\$USER${j}
-          if [ -n "${bdb}" -a "${bhost}" -a "${buser}" ]; then
-	    echo "STORE PATH (SERVER=${i}, CLIENT=${j}, CONNINFO='dbname=${db} host=${host} user=${user}');" >> $mktmp/slonik.script
+          eval bport=\$PORT${j}
+          if [ -n "${bdb}" -a "${bhost}" -a "${buser}" -a "${bport}" ]; then
+	    echo "STORE PATH (SERVER=${i}, CLIENT=${j}, CONNINFO='dbname=${db} host=${host} user=${user} port=${port}');" >> $mktmp/slonik.script
           else
             err 3 "No conninfo"
           fi
@@ -405,7 +409,7 @@
   eval opgbindir=\$PGBINDIR${originnode}
   eval oport=\$PORT${originnode}
   eval cluster=\$CLUSTER1
-  conninfo="-h ${ohost} -p ${oport} ${odb} ${ouser}"
+  conninfo="-h ${ohost} -p ${oport} -d ${odb} -U ${ouser}"
   status "launching polling script"
   case `uname` in
     MINGW32*)



More information about the Slony1-commit mailing list