Merge "Bring back signal-related tests"
diff --git a/functional/test_create_update.py b/functional/test_create_update.py
index 771404a..ae81463 100644
--- a/functional/test_create_update.py
+++ b/functional/test_create_update.py
@@ -625,3 +625,51 @@
self.assertEqual({'test1': 'OS::Heat::TestResource',
'test2': 'My::TestResource'},
self.list_resources(stack_identifier))
+
+ def test_stack_update_with_new_version(self):
+ """Update handles new template version in failure.
+
+ If a stack update fails while changing the template version, update is
+ able to handle the new version fine.
+ """
+ stack_identifier = self.stack_create(
+ template=test_template_one_resource)
+
+ # Update with a new function and make the update fails
+ template = _change_rsrc_properties(test_template_two_resource,
+ ['test1'], {'fail': True})
+
+ template['heat_template_version'] = '2015-10-15'
+ template['resources']['test2']['properties']['value'] = {
+ 'list_join': [',', ['a'], ['b']]}
+ self.update_stack(stack_identifier,
+ template=template,
+ expected_status='UPDATE_FAILED')
+
+ template = _change_rsrc_properties(template,
+ ['test2'], {'value': 'Test2'})
+ self.update_stack(stack_identifier,
+ template=template,
+ expected_status='UPDATE_FAILED')
+ self._stack_delete(stack_identifier)
+
+ def test_stack_update_with_old_version(self):
+ """Update handles old template version in failure.
+
+ If a stack update fails while changing the template version, update is
+ able to handle the old version fine.
+ """
+ template = _change_rsrc_properties(
+ test_template_one_resource,
+ ['test1'], {'value': {'list_join': [',', ['a'], ['b']]}})
+ template['heat_template_version'] = '2015-10-15'
+ stack_identifier = self.stack_create(
+ template=template)
+
+ # Update with a new function and make the update fails
+ template = _change_rsrc_properties(test_template_one_resource,
+ ['test1'], {'fail': True})
+ self.update_stack(stack_identifier,
+ template=template,
+ expected_status='UPDATE_FAILED')
+ self._stack_delete(stack_identifier)
diff --git a/scenario/test_aodh_alarm.py b/scenario/test_aodh_alarm.py
index 49bcad9..90288a2 100644
--- a/scenario/test_aodh_alarm.py
+++ b/scenario/test_aodh_alarm.py
@@ -55,8 +55,3 @@
# Note: there is little point waiting more than 60s+time to scale up.
self.assertTrue(test.call_until_true(
120, 2, self.check_instance_count, stack_identifier, 2))
-
- # Temporarily avoids a race condition, addressed in the
- # next change https://review.openstack.org/#/c/449351/
- import time
- time.sleep(3)