From: Craig Ringer Date: Fri, 15 May 2015 09:26:08 +0000 (+0800) Subject: fixup! Add a test for node part X-Git-Tag: bdr-plugin/0.9.1~14 X-Git-Url: http://git.postgresql.org/gitweb/static/%7B%7Bpguslink%28?a=commitdiff_plain;h=951452c1bfce7b5f19d4eab20cf9e938761b6f2b;p=2ndquadrant_bdr.git fixup! Add a test for node part Didn't check in the expected/ data --- diff --git a/expected/part_bdr.out b/expected/part_bdr.out index e69de29bb2..ac0351d125 100644 --- a/expected/part_bdr.out +++ b/expected/part_bdr.out @@ -0,0 +1,46 @@ +\c postgres +SELECT bdr.bdr_part_by_node_names(ARRAY['node-pg']); + bdr_part_by_node_names +------------------------ + +(1 row) + +SELECT pg_xlog_wait_remote_apply(pg_current_xlog_location(), 0); + pg_xlog_wait_remote_apply +--------------------------- + +(1 row) + +\c regression +-- There should now be zero slots +SELECT plugin, slot_type, database, active FROM pg_replication_slots; + plugin | slot_type | database | active +--------+-----------+------------+-------- + bdr | logical | postgres | f + bdr | logical | regression | f +(2 rows) + +-- Zero active connections +SELECT count(*) FROM pg_stat_replication; + count +------- + 0 +(1 row) + +-- and the node state for the removed node should show 'k' +SELECT node_name, node_status FROM bdr.bdr_nodes; + node_name | node_status +-----------------+------------- + node-regression | r + node-pg | k +(2 rows) + +\c postgres +-- ... on both nodes. +SELECT node_name, node_status FROM bdr.bdr_nodes; + node_name | node_status +-----------------+------------- + node-regression | r + node-pg | k +(2 rows) +