pgpool2.git / summary / log / commit / refs
commit b694e7ee1df3177982838fbfd4526d29d3b5aeb7
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Sat Apr 26 10:18:29 2014 +0000
Fix unwanted JDBC regression test failure.
JDBC tests mixes SELECT and DML, an it causes random regression
failures when tested in streaming replication mode. This is due to
streaming replication lag. To fix the problem, set number of DB nodes
to 1 when operated in the streaming replication mode.
src/test/regression/tests/005.jdbc/test.sh | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/test/regression/tests/005.jdbc/test.sh b/src/test/regression/tests/005.jdbc/test.sh
index 6cf3f1d9f..6cf754afd 100755
--- a/src/test/regression/tests/005.jdbc/test.sh
+++ b/src/test/regression/tests/005.jdbc/test.sh
@@ -9,13 +9,23 @@ export CLASSPATH=.:$JDBC_DRIVER
for mode in s r n
do
+ echo "===== mode:$mode ====="
rm -fr $TESTDIR
mkdir $TESTDIR
cd $TESTDIR
# create test environment
echo -n "creating test environment..."
- sh $PGPOOL_SETUP -m $mode -n 2 || exit 1
+
+ # to avoid repication lag problem when testing under streaming
+ # replication mode, set number of cluster to 1 when in the mode
+ if [ $mode = "s" ];then
+ n=1
+ else
+ n=2
+ fi
+
+ sh $PGPOOL_SETUP -m $mode -n $n || exit 1
echo "done."
source ./bashrc.ports
[parent: 9d14771f676e]