pgpool2.git / summary / log / commit / refs
commit f2b5d17e23bbd77bab7a3c3db6a1ad23b613e17e
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Mon Aug 15 09:50:45 2016 +0000
Fix regression failure of 003.failover.
Update expected data to reflect the changes made to "show pool_nodes".
Also fix "show pool_nodes" to proper use "_" instead of space for the
column name.
src/test/regression/tests/003.failover/create_expected.sql | 11 ++++++-----
src/test/regression/tests/003.failover/test.sh | 2 +-
src/test/regression/tests/066.bug230/Sample.java | 1 +
src/utils/pool_process_reporting.c | 2 +-
4 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/test/regression/tests/003.failover/create_expected.sql b/src/test/regression/tests/003.failover/create_expected.sql
index cf8635ede..5be557659 100644
--- a/src/test/regression/tests/003.failover/create_expected.sql
+++ b/src/test/regression/tests/003.failover/create_expected.sql
@@ -7,14 +7,15 @@ CREATE TEMP TABLE tmp (
role text,
select_cnt text,
load_balance_node text,
+ replication_delay text,
mode text);
INSERT INTO tmp VALUES
-('0',:dir,'11002','up','0.500000','primary','0','false','s'),
-('1',:dir,'11003','down','0.500000','standby','0','false','s'),
-('0',:dir,'11002','up','0.500000','master','0','false','r'),
-('1',:dir,'11003','down','0.500000','slave','0','false','r');
+('0',:dir,'11002','up','0.500000','primary','0','false','0','s'),
+('1',:dir,'11003','down','0.500000','standby','0','false','0','s'),
+('0',:dir,'11002','up','0.500000','master','0','false','0','r'),
+('1',:dir,'11003','down','0.500000','slave','0','false','0','r');
-SELECT node_id,hostname,port,status,lb_weight,role,select_cnt,load_balance_node
+SELECT node_id,hostname,port,status,lb_weight,role,select_cnt,load_balance_node,replication_delay
FROM tmp
WHERE mode = :mode
diff --git a/src/test/regression/tests/003.failover/test.sh b/src/test/regression/tests/003.failover/test.sh
index 5ecd5998c..e31592e24 100755
--- a/src/test/regression/tests/003.failover/test.sh
+++ b/src/test/regression/tests/003.failover/test.sh
@@ -27,7 +27,7 @@ do
# trrigger failover
$PG_CTL -D data1 -m f stop
wait_for_pgpool_startup
- $PSQL -c "show pool_nodes" test |sed -e 's/true/false/'> result
+ $PSQL -c "show pool_nodes" test |sed -e 's/true /false/'> result
# check the output of "show pool_nodes".
LANG=C $PSQL -f ../create_expected.sql -v mode="'$mode'" -v dir="'$PGSOCKET_DIR'" test | tail -n 6 > expected
diff --git a/src/test/regression/tests/066.bug230/Sample.java b/src/test/regression/tests/066.bug230/Sample.java
index 1910d99df..1c0abeaa2 100644
--- a/src/test/regression/tests/066.bug230/Sample.java
+++ b/src/test/regression/tests/066.bug230/Sample.java
@@ -27,5 +27,6 @@ public class Sample {
System.out.println(rs.getString(1));
}
rs.close();
+ conn.close();
}
}
diff --git a/src/utils/pool_process_reporting.c b/src/utils/pool_process_reporting.c
index 88a905bc2..ad6847406 100644
--- a/src/utils/pool_process_reporting.c
+++ b/src/utils/pool_process_reporting.c
@@ -1190,7 +1190,7 @@ POOL_REPORT_NODES* get_nodes(int *nrows)
void nodes_reporting(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend)
{
- static char *field_names[] = {"node_id","hostname", "port", "status", "lb_weight", "role", "select_cnt", "load_balance_node", "replication delay"};
+ static char *field_names[] = {"node_id","hostname", "port", "status", "lb_weight", "role", "select_cnt", "load_balance_node", "replication_delay"};
short num_fields = sizeof(field_names)/sizeof(char *);
int i;
short s;
[parent: dc3706c81659]