mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 13:45:17 +02:00
e2e: wait for replica after failover before fetching leader (#1649)
This commit is contained in:
@@ -1177,6 +1177,7 @@ class EndToEndTestCase(unittest.TestCase):
|
||||
|
||||
# operator should now recreate the master pod and do a switchover before
|
||||
k8s.wait_for_pod_failover(replica_nodes, 'spilo-role=master,' + cluster_label)
|
||||
k8s.wait_for_pod_start('spilo-role=replica,' + cluster_label)
|
||||
|
||||
# check if the former replica is now the new master
|
||||
leader = k8s.get_cluster_leader_pod()
|
||||
@@ -1246,6 +1247,7 @@ class EndToEndTestCase(unittest.TestCase):
|
||||
|
||||
# wait for next sync, replica should be running normally by now and be ready for switchover
|
||||
k8s.wait_for_pod_failover(replica_nodes, 'spilo-role=master,' + cluster_label)
|
||||
k8s.wait_for_pod_start('spilo-role=replica,' + cluster_label)
|
||||
|
||||
# check if the former replica is now the new master
|
||||
leader = k8s.get_cluster_leader_pod()
|
||||
|
||||
Reference in New Issue
Block a user