Merge "Add default release names for template versions"
diff --git a/common/config.py b/common/config.py
index e0351d5..b3615d2 100644
--- a/common/config.py
+++ b/common/config.py
@@ -121,7 +121,7 @@
     cfg.ListOpt('skip_scenario_test_list',
                 help="List of scenario test class or class.method "
                      "names to skip ex. NeutronLoadBalancerTest, "
-                     "CeilometerAlarmTest.test_alarm"),
+                     "AodhAlarmTest.test_alarm"),
     cfg.ListOpt('skip_test_stack_action_list',
                 help="List of stack actions in tests to skip "
                      "ex. ABANDON, ADOPT, SUSPEND, RESUME"),
diff --git a/functional/test_autoscaling.py b/functional/test_autoscaling.py
index ebc7f61..e97ae89 100644
--- a/functional/test_autoscaling.py
+++ b/functional/test_autoscaling.py
@@ -726,8 +726,9 @@
 
         # suspend the top level stack.
         self.client.actions.suspend(stack_id=stack_identifier)
-        self._wait_for_resource_status(
-            stack_identifier, 'JobServerGroup', 'SUSPEND_COMPLETE')
+
+        # Wait for stack to reach SUSPEND_COMPLETE
+        self._wait_for_stack_status(stack_identifier, 'SUSPEND_COMPLETE')
 
         # Send a signal and an exception will raise
         ex = self.assertRaises(exc.BadRequest,
diff --git a/functional/test_create_update.py b/functional/test_create_update.py
index aa4bdbf..446c9a3 100644
--- a/functional/test_create_update.py
+++ b/functional/test_create_update.py
@@ -26,7 +26,7 @@
                 'value': 'Test1',
                 'fail': False,
                 'update_replace': False,
-                'wait_secs': 0,
+                'wait_secs': 1,
                 'action_wait_secs': {'create': 1},
                 'client_name': 'nova',
                 'entity_name': 'servers',
diff --git a/functional/test_purge.py b/functional/test_purge.py
index 42feee3..fd652a9 100644
--- a/functional/test_purge.py
+++ b/functional/test_purge.py
@@ -10,6 +10,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import time
+
 from oslo_concurrency import processutils
 
 from heat_integrationtests.functional import functional_base
@@ -30,6 +32,7 @@
         stacks = dict((stack.id, stack) for stack in
                       self.client.stacks.list(show_deleted=True))
         self.assertIn(stack_identifier.split('/')[1], stacks)
+        time.sleep(1)
         cmd = "heat-manage purge_deleted 0"
         processutils.execute(cmd, shell=True)
         stacks = dict((stack.id, stack) for stack in
@@ -40,6 +43,7 @@
         stack_identifier = self.stack_create(template=self.template,
                                              tags="foo,bar")
         self._stack_delete(stack_identifier)
+        time.sleep(1)
         cmd = "heat-manage purge_deleted 0"
         processutils.execute(cmd, shell=True)
         stacks = dict((stack.id, stack) for stack in
diff --git a/functional/test_update_restricted.py b/functional/test_update_restricted.py
index d406b53..7087c0c 100644
--- a/functional/test_update_restricted.py
+++ b/functional/test_update_restricted.py
@@ -73,6 +73,9 @@
             self._check_for_restriction_reason(resource_events,
                                                reason_update_restrict))
 
+        # Ensure the timestamp changes, since this will be very quick
+        time.sleep(1)
+
         # check update succeeds - with only 'replace' restricted
         self.update_stack(stack_identifier, update_template,
                           env_replace_restrict,
diff --git a/scenario/templates/test_ceilometer_alarm.yaml b/scenario/templates/test_aodh_alarm.yaml
similarity index 96%
rename from scenario/templates/test_ceilometer_alarm.yaml
rename to scenario/templates/test_aodh_alarm.yaml
index 01bc790..9218f56 100644
--- a/scenario/templates/test_ceilometer_alarm.yaml
+++ b/scenario/templates/test_aodh_alarm.yaml
@@ -15,7 +15,7 @@
       cooldown: 0
       scaling_adjustment: 1
   alarm:
-    type: OS::Ceilometer::Alarm
+    type: OS::Aodh::Alarm
     properties:
       description: Scale-up if the average CPU > 50% for 1 minute
       meter_name: test_meter
diff --git a/scenario/test_ceilometer_alarm.py b/scenario/test_aodh_alarm.py
similarity index 89%
rename from scenario/test_ceilometer_alarm.py
rename to scenario/test_aodh_alarm.py
index aa29861..90288a2 100644
--- a/scenario/test_ceilometer_alarm.py
+++ b/scenario/test_aodh_alarm.py
@@ -18,12 +18,12 @@
 LOG = logging.getLogger(__name__)
 
 
-class CeilometerAlarmTest(scenario_base.ScenarioTestsBase):
-    """Class is responsible for testing of ceilometer usage."""
+class AodhAlarmTest(scenario_base.ScenarioTestsBase):
+    """Class is responsible for testing of aodh usage."""
     def setUp(self):
-        super(CeilometerAlarmTest, self).setUp()
+        super(AodhAlarmTest, self).setUp()
         self.template = self._load_template(__file__,
-                                            'test_ceilometer_alarm.yaml',
+                                            'test_aodh_alarm.yaml',
                                             'templates')
 
     def check_instance_count(self, stack_identifier, expected):