@@ -72,7 +72,10 @@ def test_004_init_secondary():
7272
7373 assert node2 .wait_until_state (target_state = "secondary" )
7474 assert node1 .wait_until_state (target_state = "primary" )
75- eq_ (node1 .get_synchronous_standby_names_local (), "*" )
75+ eq_ (
76+ node1 .get_synchronous_standby_names_local (),
77+ "ANY 1 (pgautofailover_standby_2)" ,
78+ )
7679
7780 assert node1 .has_needed_replication_slots ()
7881 assert node2 .has_needed_replication_slots ()
@@ -125,7 +128,9 @@ def test_007_005_disable_maintenance():
125128 assert node1 .wait_until_state (target_state = "secondary" )
126129 assert node2 .wait_until_state (target_state = "primary" )
127130
128- node2 .check_synchronous_standby_names (ssn = "*" )
131+ node2 .check_synchronous_standby_names (
132+ ssn = "ANY 1 (pgautofailover_standby_1)"
133+ )
129134
130135
131136def test_008_001_enable_maintenance_secondary ():
@@ -146,7 +151,9 @@ def test_008_002_disable_maintenance_secondary():
146151 assert node1 .wait_until_state (target_state = "secondary" )
147152 assert node2 .wait_until_state (target_state = "primary" )
148153
149- node2 .check_synchronous_standby_names (ssn = "*" )
154+ node2 .check_synchronous_standby_names (
155+ ssn = "ANY 1 (pgautofailover_standby_1)"
156+ )
150157
151158
152159# the rest of the tests expect node1 to be primary, make it so
@@ -156,7 +163,10 @@ def test_009_failback():
156163 assert node2 .wait_until_state (target_state = "secondary" )
157164 assert node1 .wait_until_state (target_state = "primary" )
158165
159- eq_ (node1 .get_synchronous_standby_names_local (), "*" )
166+ eq_ (
167+ node1 .get_synchronous_standby_names_local (),
168+ "ANY 1 (pgautofailover_standby_2)" ,
169+ )
160170
161171
162172def test_010_fail_primary ():
@@ -176,7 +186,10 @@ def test_012_start_node1_again():
176186 node1 .run ()
177187
178188 assert node2 .wait_until_state (target_state = "primary" )
179- eq_ (node2 .get_synchronous_standby_names_local (), "*" )
189+ eq_ (
190+ node2 .get_synchronous_standby_names_local (),
191+ "ANY 1 (pgautofailover_standby_1)" ,
192+ )
180193
181194 assert node1 .wait_until_state (target_state = "secondary" )
182195
@@ -226,7 +239,10 @@ def test_019_run_secondary():
226239 assert node2 .has_needed_replication_slots ()
227240 assert node3 .has_needed_replication_slots ()
228241
229- eq_ (node2 .get_synchronous_standby_names_local (), "*" )
242+ eq_ (
243+ node2 .get_synchronous_standby_names_local (),
244+ "ANY 1 (pgautofailover_standby_3)" ,
245+ )
230246
231247
232248# In previous versions of pg_auto_failover we removed the replication slot
@@ -249,12 +265,18 @@ def test_020_multiple_manual_failover_verify_replication_slots():
249265 assert node2 .has_needed_replication_slots ()
250266 assert node3 .has_needed_replication_slots ()
251267
252- eq_ (node3 .get_synchronous_standby_names_local (), "*" )
268+ eq_ (
269+ node3 .get_synchronous_standby_names_local (),
270+ "ANY 1 (pgautofailover_standby_2)" ,
271+ )
253272
254273 print ("Calling pg_autoctl perform promotion on node 2" )
255274 node2 .perform_promotion ()
256275 assert node2 .wait_until_state (target_state = "primary" )
257- eq_ (node2 .get_synchronous_standby_names_local (), "*" )
276+ eq_ (
277+ node2 .get_synchronous_standby_names_local (),
278+ "ANY 1 (pgautofailover_standby_3)" ,
279+ )
258280
259281 assert node3 .wait_until_state (target_state = "secondary" )
260282
@@ -271,7 +293,10 @@ def test_020_multiple_manual_failover_verify_replication_slots():
271293def test_021_ifdown_primary ():
272294 print ()
273295 assert node2 .wait_until_state (target_state = "primary" )
274- eq_ (node2 .get_synchronous_standby_names_local (), "*" )
296+ eq_ (
297+ node2 .get_synchronous_standby_names_local (),
298+ "ANY 1 (pgautofailover_standby_3)" ,
299+ )
275300 node2 .ifdown ()
276301
277302
@@ -308,7 +333,10 @@ def test_023_ifup_old_primary():
308333 assert node2 .wait_until_state ("secondary" )
309334 assert node3 .wait_until_state ("primary" )
310335
311- eq_ (node3 .get_synchronous_standby_names_local (), "*" )
336+ eq_ (
337+ node3 .get_synchronous_standby_names_local (),
338+ "ANY 1 (pgautofailover_standby_2)" ,
339+ )
312340
313341
314342def test_024_stop_postgres_monitor ():
0 commit comments