diff --git a/tests/integration/tests/test_util/harness/lxd.py b/tests/integration/tests/test_util/harness/lxd.py index 7b767af05..43bcef980 100644 --- a/tests/integration/tests/test_util/harness/lxd.py +++ b/tests/integration/tests/test_util/harness/lxd.py @@ -131,8 +131,11 @@ def new_instance(self, network_type: str = "IPv4") -> Instance: except subprocess.CalledProcessError as e: raise HarnessError(f"Failed to create LXD container {instance_id}") from e - self.exec(instance_id, ["snap", "wait", "system", "seed.loaded"]) - return Instance(self, instance_id) + instance = Instance(self, instance_id) + stubbornly(retries=3, delay_s=5).on(instance).exec( + ["snap", "wait", "system", "seed.loaded"] + ) + return instance def _configure_profile(self, profile_name: str, profile_config: str): LOG.debug("Checking for LXD profile %s", profile_name)