Skip to content

Commit 6caf3a5

Browse files
authored
e2e: wait for replica after failover before fetching leader (#1649)
1 parent 08665bb commit 6caf3a5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

e2e/tests/test_e2e.py

+2
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,7 @@ def test_rolling_update_flag(self):
11771177

11781178
# operator should now recreate the master pod and do a switchover before
11791179
k8s.wait_for_pod_failover(replica_nodes, 'spilo-role=master,' + cluster_label)
1180+
k8s.wait_for_pod_start('spilo-role=replica,' + cluster_label)
11801181

11811182
# check if the former replica is now the new master
11821183
leader = k8s.get_cluster_leader_pod()
@@ -1246,6 +1247,7 @@ def test_rolling_update_label_timeout(self):
12461247

12471248
# wait for next sync, replica should be running normally by now and be ready for switchover
12481249
k8s.wait_for_pod_failover(replica_nodes, 'spilo-role=master,' + cluster_label)
1250+
k8s.wait_for_pod_start('spilo-role=replica,' + cluster_label)
12491251

12501252
# check if the former replica is now the new master
12511253
leader = k8s.get_cluster_leader_pod()

0 commit comments

Comments
 (0)