From 99ddffac32e54ae1d1c45dc4bfe2b73cc82cfbbd Mon Sep 17 00:00:00 2001 From: Petr Gusev Date: Thu, 22 Feb 2024 15:42:05 +0400 Subject: [PATCH] manager_client: server_add with start=false shouldn't call driver_connect If the server is not started there is not point in starting the driver, it would fail because there are no nodes to connect to. On the other hand, we should connect the driver in server_start() if it's not connected yet. --- test/pylib/manager_client.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/pylib/manager_client.py b/test/pylib/manager_client.py index 03e6cada5a..cb3bae5f77 100644 --- a/test/pylib/manager_client.py +++ b/test/pylib/manager_client.py @@ -189,7 +189,10 @@ class ManagerClient(): data = {"expected_error": expected_error} await self.client.put_json(f"/cluster/server/{server_id}/start", data) await self.server_sees_others(server_id, wait_others, interval = wait_interval) - self._driver_update() + if self.cql: + self._driver_update() + else: + await self.driver_connect() async def server_restart(self, server_id: ServerNum, wait_others: int = 0, wait_interval: float = 45) -> None: @@ -299,7 +302,7 @@ class ManagerClient(): logger.debug("ManagerClient added %s", s_info) if self.cql: self._driver_update() - else: + elif start: await self.driver_connect() return s_info @@ -339,7 +342,7 @@ class ManagerClient(): logger.debug("ManagerClient added %s", s_infos) if self.cql: self._driver_update() - else: + elif start: await self.driver_connect() return s_infos