Remove handling for client status races

Now that we guarantee that resources are UPDATE_IN_PROGRESS before the
stack update call returns for legacy stacks (this was already true for
convergence stacks), there is no need to have special handling to check the
updated_time in functional tests.

Change-Id: I1ebf38285746a090660044ffdb854e98b5f0dba0
Depends-On: https://review.openstack.org/589172
Story: #1669608
Task: 23349
diff --git a/heat_tempest_plugin/common/test.py b/heat_tempest_plugin/common/test.py
index cbf4abb..3be1450 100644
--- a/heat_tempest_plugin/common/test.py
+++ b/heat_tempest_plugin/common/test.py
@@ -142,7 +142,6 @@
                              '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:
@@ -340,17 +339,7 @@
     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
@@ -360,20 +349,12 @@
         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,
@@ -458,9 +439,6 @@
         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,
@@ -486,9 +464,6 @@
 
         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:
diff --git a/heat_tempest_plugin/tests/api/gabbits/stacks.yaml b/heat_tempest_plugin/tests/api/gabbits/stacks.yaml
index 4947416..ba15f7e 100644
--- a/heat_tempest_plugin/tests/api/gabbits/stacks.yaml
+++ b/heat_tempest_plugin/tests/api/gabbits/stacks.yaml
@@ -155,7 +155,6 @@
     delay: 1.0
   response_json_paths:
     $.stack.stack_status: UPDATE_COMPLETE
-    $.stack.updated_time: /^(?!$HISTORY['poll for stack UPDATE_COMPLETE'].$RESPONSE['$.stack.updated_time'])/
 
 - name: list stack outputs
   desc: bbd98b50-b75b-44a1-b7e8-0a68fd7c6d33