From b606b6f77ba38c2220a1cce0ce26c9eb42fc1935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mu=C3=9Fler?= Date: Tue, 27 Oct 2020 15:19:19 +0100 Subject: [PATCH] Wait for pods to run. --- e2e/tests/test_e2e.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/tests/test_e2e.py b/e2e/tests/test_e2e.py index 6099f3296..92eb12550 100644 --- a/e2e/tests/test_e2e.py +++ b/e2e/tests/test_e2e.py @@ -721,7 +721,12 @@ class EndToEndTestCase(unittest.TestCase): k8s.update_config(patch_toleration_config, step="allow tainted nodes") + 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") + # toggle pod anti affinity to move replica away from master node + nm, new_replica_nodes = k8s.get_cluster_nodes() + new_master_node = nm[0] self.assert_distributed_pods(new_master_node, new_replica_nodes, cluster_label) @timeout_decorator.timeout(TEST_TIMEOUT_SEC) @@ -864,10 +869,5 @@ class EndToEndTestCase(unittest.TestCase): return True - - - - - if __name__ == '__main__': unittest.main()