summaryrefslogtreecommitdiff
path: root/heat_integrationtests/common
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-11-16 09:20:26 +0000
committerGerrit Code Review <review@openstack.org>2020-11-16 09:20:26 +0000
commit607d73ea6f05a537abb084561d6e498ef1e8a3c2 (patch)
treefaba77644dbf1a54e4cef121240f0c9a3bd6caac /heat_integrationtests/common
parent90d5ecc7ad761700929751a00e45fe222ef3977a (diff)
parent6b7d64988c88cfb56d072f103e58968876777d5d (diff)
downloadheat-607d73ea6f05a537abb084561d6e498ef1e8a3c2.tar.gz
Merge "Remove handling for client status races"
Diffstat (limited to 'heat_integrationtests/common')
-rw-r--r--heat_integrationtests/common/test.py39
1 files changed, 7 insertions, 32 deletions
diff --git a/heat_integrationtests/common/test.py b/heat_integrationtests/common/test.py
index 7381eacbd..fcc117d6e 100644
--- a/heat_integrationtests/common/test.py
+++ b/heat_integrationtests/common/test.py
@@ -92,7 +92,6 @@ class HeatIntegrationTest(testscenarios.WithScenarios,
'No password configured')
self.setup_clients(self.conf)
self.useFixture(fixtures.FakeLogger(format=_LOG_FORMAT))
- self.updated_time = {}
if self.conf.disable_ssl_certificate_validation:
self.verify_cert = False
else:
@@ -278,17 +277,7 @@ class HeatIntegrationTest(testscenarios.WithScenarios,
def _verify_status(self, stack, stack_identifier, status,
fail_regexp, is_action_cancelled=False):
if stack.stack_status == status:
- # Handle UPDATE_COMPLETE/FAILED case: Make sure we don't
- # wait for a stale UPDATE_COMPLETE/FAILED status.
- if status in ('UPDATE_FAILED', 'UPDATE_COMPLETE'):
- if is_action_cancelled:
- return True
-
- if self.updated_time.get(
- stack_identifier) != stack.updated_time:
- self.updated_time[stack_identifier] = stack.updated_time
- return True
- elif status == 'DELETE_COMPLETE' and stack.deletion_time is None:
+ if status == 'DELETE_COMPLETE' and stack.deletion_time is None:
# Wait for deleted_time to be filled, so that we have more
# confidence the operation is finished.
return False
@@ -298,20 +287,12 @@ class HeatIntegrationTest(testscenarios.WithScenarios,
wait_for_action = status.split('_')[0]
if (stack.action == wait_for_action and
fail_regexp.search(stack.stack_status)):
- # Handle UPDATE_COMPLETE/UPDATE_FAILED case.
- if status in ('UPDATE_FAILED', 'UPDATE_COMPLETE'):
- if self.updated_time.get(
- stack_identifier) != stack.updated_time:
- self.updated_time[stack_identifier] = stack.updated_time
- raise exceptions.StackBuildErrorException(
- stack_identifier=stack_identifier,
- stack_status=stack.stack_status,
- stack_status_reason=stack.stack_status_reason)
- else:
- raise exceptions.StackBuildErrorException(
- stack_identifier=stack_identifier,
- stack_status=stack.stack_status,
- stack_status_reason=stack.stack_status_reason)
+ raise exceptions.StackBuildErrorException(
+ stack_identifier=stack_identifier,
+ stack_status=stack.stack_status,
+ stack_status_reason=stack.stack_status_reason)
+
+ return False
def _wait_for_stack_status(self, stack_identifier, status,
failure_pattern=None,
@@ -402,9 +383,6 @@ class HeatIntegrationTest(testscenarios.WithScenarios,
env_files = files or {}
parameters = parameters or {}
- self.updated_time[stack_identifier] = self.client.stacks.get(
- stack_identifier, resolve_outputs=False).updated_time
-
self._handle_in_progress(
self.client.stacks.update,
stack_id=stack_identifier,
@@ -430,9 +408,6 @@ class HeatIntegrationTest(testscenarios.WithScenarios,
stack_name = stack_identifier.split('/')[0]
- self.updated_time[stack_identifier] = self.client.stacks.get(
- stack_identifier, resolve_outputs=False).updated_time
-
if rollback:
self.client.actions.cancel_update(stack_name)
else: