diff options
author | Rakesh H S <rh-s@hpe.com> | 2015-11-16 20:23:26 +0530 |
---|---|---|
committer | Rakesh H S <rh-s@hpe.com> | 2015-12-03 18:35:57 +0530 |
commit | 411360f7d130a7639bf01954eef71c8bf7d097fa (patch) | |
tree | a93e9f7f1468dc5d7a5801be3164c9ba0835c3ec /heat/tests/test_stack_update.py | |
parent | fde2da4f019196e9148e4115b89cba76c3f7b72c (diff) | |
download | heat-411360f7d130a7639bf01954eef71c8bf7d097fa.tar.gz |
Fix to send only one notification when update completes
Presently when an update is COMPLETE/FAILED, two events are reported.
In update_task we are already sending notification when an update
completes, however due to recent changes, notifications are also
sent at the time of releasing stack lock.
For update, we need not send notification when releasing lock.
Change-Id: Idc81f87b143dc43fa5409798534646d8400559ff
Closes-Bug: #1516090
Diffstat (limited to 'heat/tests/test_stack_update.py')
-rw-r--r-- | heat/tests/test_stack_update.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/heat/tests/test_stack_update.py b/heat/tests/test_stack_update.py index f137107d8..58f4416fc 100644 --- a/heat/tests/test_stack_update.py +++ b/heat/tests/test_stack_update.py @@ -924,6 +924,7 @@ class StackUpdateTest(common.HeatTestCase): self.stack.create() self.assertEqual((stack.Stack.CREATE, stack.Stack.COMPLETE), self.stack.state) + self.stack._persist_state() tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12', 'Resources': {'AResource': {'Type': 'ResourceWithPropsType', @@ -944,6 +945,10 @@ class StackUpdateTest(common.HeatTestCase): self.stack.update(updated_stack) self.assertEqual((stack.Stack.ROLLBACK, stack.Stack.COMPLETE), self.stack.state) + self.eng = service.EngineService('a-host', 'a-topic') + events = self.eng.list_events(self.ctx, self.stack.identifier()) + self.assertEqual(10, len(events)) + self.assertEqual('abc', self.stack['AResource'].properties['Foo']) self.assertEqual(5, mock_db_update.call_count) self.assertEqual('UPDATE', |