From 74465d7dd83b77ec2edc9873886567583ba99f6c Mon Sep 17 00:00:00 2001 From: vsaienko Date: Thu, 31 Mar 2016 10:51:22 +0300 Subject: [PATCH] Tune interval for node provision state check By default node_provision_state is checked each 1 second. It may cause test to fail while actual test result is success due to testr bug #1382579 Also it creates additional load on service and increase execution time for test. This patch set interval to 30 sec. It should speed up the test on overloaded nodes. Related-Bug: #1382579 Change-Id: I631b0ee5fd8ff7c1d655b52496cf920d088c253d --- .../tests/scenario/baremetal_manager.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py index 1f4d78f513..e5e166b761 100644 --- a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py +++ b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py @@ -88,10 +88,10 @@ class BaremetalScenarioTest(manager.ScenarioTest): (node_id, state_attr, target_states)) raise lib_exc.TimeoutException(msg) - def wait_provisioning_state(self, node_id, state, timeout): + def wait_provisioning_state(self, node_id, state, timeout, interval=1): self._node_state_timeout( node_id=node_id, state_attr='provision_state', - target_states=state, timeout=timeout) + target_states=state, timeout=timeout, interval=interval) def wait_power_state(self, node_id, state): self._node_state_timeout( @@ -160,7 +160,8 @@ class BaremetalScenarioTest(manager.ScenarioTest): self.wait_provisioning_state(self.node['uuid'], BaremetalProvisionStates.ACTIVE, - timeout=CONF.baremetal.active_timeout) + timeout=CONF.baremetal.active_timeout, + interval=30) waiters.wait_for_server_status(self.servers_client, self.instance['id'], 'ACTIVE') @@ -175,4 +176,5 @@ class BaremetalScenarioTest(manager.ScenarioTest): self.wait_provisioning_state( self.node['uuid'], BaremetalProvisionStates.NOSTATE, - timeout=CONF.baremetal.unprovision_timeout) + timeout=CONF.baremetal.unprovision_timeout, + interval=30)