Log resource cleanup failure and carry on

Fixes #417
This commit is contained in:
Frode Nordahl
2020-09-15 20:29:48 +02:00
parent 4339862d3a
commit 89ea43d0d5

View File

@@ -495,6 +495,11 @@ class OpenStackBaseTest(BaseCharmTest):
self.nova_client.servers,
server.id,
msg="server")
except AssertionError as e:
# Resource failed to be removed within the expected time frame,
# log this fact and carry on.
logging.warning('Gave up waiting for resource cleanup: "{}"'
.format(str(e)))
except AttributeError:
# Test did not define self.RESOURCE_PREFIX, ignore.
pass