add more waiting in node_affinity_test
This commit is contained in:
parent
48505730b8
commit
ba955305f9
|
|
@ -989,7 +989,6 @@ class EndToEndTestCase(unittest.TestCase):
|
||||||
# verify we are in good state from potential previous tests
|
# verify we are in good state from potential previous tests
|
||||||
self.eventuallyEqual(lambda: k8s.count_running_pods(), 2, "No 2 pods running")
|
self.eventuallyEqual(lambda: k8s.count_running_pods(), 2, "No 2 pods running")
|
||||||
self.eventuallyEqual(lambda: len(k8s.get_patroni_running_members("acid-minimal-cluster-0")), 2, "Postgres status did not enter running")
|
self.eventuallyEqual(lambda: len(k8s.get_patroni_running_members("acid-minimal-cluster-0")), 2, "Postgres status did not enter running")
|
||||||
self.eventuallyEqual(lambda: self.k8s.get_operator_state(), {"0": "idle"}, "Operator does not get in sync")
|
|
||||||
|
|
||||||
# get nodes of master and replica(s)
|
# get nodes of master and replica(s)
|
||||||
master_node, replica_nodes = k8s.get_pg_nodes(cluster_label)
|
master_node, replica_nodes = k8s.get_pg_nodes(cluster_label)
|
||||||
|
|
@ -1075,6 +1074,9 @@ class EndToEndTestCase(unittest.TestCase):
|
||||||
body=patch_node_remove_affinity_config)
|
body=patch_node_remove_affinity_config)
|
||||||
self.eventuallyEqual(lambda: self.k8s.get_operator_state(), {"0": "idle"}, "Operator does not get in sync")
|
self.eventuallyEqual(lambda: self.k8s.get_operator_state(), {"0": "idle"}, "Operator does not get in sync")
|
||||||
|
|
||||||
|
self.eventuallyEqual(lambda: k8s.count_running_pods(), 2, "No 2 pods running")
|
||||||
|
self.eventuallyEqual(lambda: len(k8s.get_patroni_running_members("acid-minimal-cluster-0")), 2, "Postgres status did not enter running")
|
||||||
|
|
||||||
# remove node affinity to move replica away from master node
|
# remove node affinity to move replica away from master node
|
||||||
nm, new_replica_nodes = k8s.get_cluster_nodes()
|
nm, new_replica_nodes = k8s.get_cluster_nodes()
|
||||||
new_master_node = nm[0]
|
new_master_node = nm[0]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue