From 455ffaf5d834f2d60bdfce07d8d8e41be2365460 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Wed, 22 Nov 2023 15:02:56 +0200 Subject: [PATCH] test: add servers_see_each_other helper The helper makes sure that all nodes in the cluster see each other as alive. --- test/pylib/manager_client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/pylib/manager_client.py b/test/pylib/manager_client.py index fdcba7fb77..3c7cff282a 100644 --- a/test/pylib/manager_client.py +++ b/test/pylib/manager_client.py @@ -407,6 +407,11 @@ class ManagerClient(): return True await wait_for(_sees_another_server, time() + interval, period=.5) + async def servers_see_each_other(self, servers: List[ServerInfo], interval: float = 45.): + """Wait till all servers see all other servers in the list""" + others = [self.server_sees_others(srv.server_id, len(servers) - 1, interval) for srv in servers] + await asyncio.gather(*others) + async def server_not_sees_other_server(self, server_ip: IPAddress, other_ip: IPAddress, interval: float = 45.): """Wait till a server sees another specific server IP as dead"""