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
This commit is contained in:
vsaienko 2016-03-31 10:51:22 +03:00 committed by Vasyl Saienko
parent cdfa120e06
commit 74465d7dd8

View File

@ -88,10 +88,10 @@ class BaremetalScenarioTest(manager.ScenarioTest):
(node_id, state_attr, target_states)) (node_id, state_attr, target_states))
raise lib_exc.TimeoutException(msg) 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( self._node_state_timeout(
node_id=node_id, state_attr='provision_state', 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): def wait_power_state(self, node_id, state):
self._node_state_timeout( self._node_state_timeout(
@ -160,7 +160,8 @@ class BaremetalScenarioTest(manager.ScenarioTest):
self.wait_provisioning_state(self.node['uuid'], self.wait_provisioning_state(self.node['uuid'],
BaremetalProvisionStates.ACTIVE, BaremetalProvisionStates.ACTIVE,
timeout=CONF.baremetal.active_timeout) timeout=CONF.baremetal.active_timeout,
interval=30)
waiters.wait_for_server_status(self.servers_client, waiters.wait_for_server_status(self.servers_client,
self.instance['id'], 'ACTIVE') self.instance['id'], 'ACTIVE')
@ -175,4 +176,5 @@ class BaremetalScenarioTest(manager.ScenarioTest):
self.wait_provisioning_state( self.wait_provisioning_state(
self.node['uuid'], self.node['uuid'],
BaremetalProvisionStates.NOSTATE, BaremetalProvisionStates.NOSTATE,
timeout=CONF.baremetal.unprovision_timeout) timeout=CONF.baremetal.unprovision_timeout,
interval=30)