From 876cca79d8ec6a701a31ed663e34bdb0503676bd Mon Sep 17 00:00:00 2001 From: Nicola Sirena Date: Tue, 1 Aug 2023 15:15:56 +0200 Subject: [PATCH] Reset cached values when cluster is stopped Signed-off-by: Nicola Sirena --- tests/integration-tests/clusters_factory.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/integration-tests/clusters_factory.py b/tests/integration-tests/clusters_factory.py index 9c72a76f19..bb05c22d1b 100644 --- a/tests/integration-tests/clusters_factory.py +++ b/tests/integration-tests/clusters_factory.py @@ -182,6 +182,11 @@ def stop(self): try: result = run_pcluster_command(cmd_args, log_error=False, custom_cli_credentials=self.custom_cli_credentials) logging.info("Cluster {0} stopped successfully".format(self.name)) + + # reset cached info + self.cluster_info = None + self.login_nodes_info = None + return result.stdout except subprocess.CalledProcessError as e: logging.error("Failed stopping cluster with error:\n%s\nand output:\n%s", e.stderr, e.stdout)