From bcaa4e7702b11eea5585a91d2dfb204baf92deb3 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Mon, 25 Dec 2023 17:10:12 +0900 Subject: [PATCH] Test: enhance 037.failover_session/test.sh. Previously it mistakenly executed pg_ctl stop after starting pgbench in background. The smart shutdown always allows pgbench to run successfully with pgbench -C option not being set because backend does not shutdown while client session continues. In order to shutdown backend in the middle of pgbench run, tweak health check parameters so that it detects the backend down as soon as possible. This will trigger failover in the middle of pgbench run. With these changes Pgpool-II 4.5 and beyond succeeds in all 4 tests, while pre-4.5 will fail in all 4 tests (that was the originally expected result). Also allow to run all the 4 tests even if some tests fail so that we can check which of which test failed. --- .../tests/037.failover_session/test.sh | 44 ++++++++++++++----- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/src/test/regression/tests/037.failover_session/test.sh b/src/test/regression/tests/037.failover_session/test.sh index 196d6b323..519d5ef5e 100755 --- a/src/test/regression/tests/037.failover_session/test.sh +++ b/src/test/regression/tests/037.failover_session/test.sh @@ -25,10 +25,18 @@ source ./bashrc.ports PCP_DETACH_NODE="$PGPOOL_INSTALL_DIR/bin/pcp_detach_node -w -h localhost -p $PCP_PORT 2" # customize pgpool.conf. disable load balance to node 2. +# Also modify health check parameters so that health check detects +# backend down earlier. cat >> etc/pgpool.conf <