Switch to use test_utils.call_until_true
test.call_until_true has been deprecated since Newton on Tempest side, and now Tempest provides test_utils.call_until_true as the stable library method. So this patch switches to use the stable method before removing old test.call_until_true on Tempest side. Change-Id: Ia4b8cf5ac58daaadac0a1ec4a55e50f312ecd256
This commit is contained in:
parent
d601a11e91
commit
d77b2635e6
@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
from tempest.common import waiters
|
from tempest.common import waiters
|
||||||
from tempest import config
|
from tempest import config
|
||||||
|
from tempest.lib.common.utils import test_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest.scenario import manager # noqa
|
from tempest.scenario import manager # noqa
|
||||||
import tempest.test
|
|
||||||
|
|
||||||
from ironic_tempest_plugin import clients
|
from ironic_tempest_plugin import clients
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ class BaremetalScenarioTest(manager.ScenarioTest):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not tempest.test.call_until_true(check_state, timeout, interval):
|
if not test_utils.call_until_true(check_state, timeout, interval):
|
||||||
msg = ("Timed out waiting for node %s to reach %s state(s) %s" %
|
msg = ("Timed out waiting for node %s to reach %s state(s) %s" %
|
||||||
(node_id, state_attr, target_states))
|
(node_id, state_attr, target_states))
|
||||||
raise lib_exc.TimeoutException(msg)
|
raise lib_exc.TimeoutException(msg)
|
||||||
@ -110,7 +110,7 @@ class BaremetalScenarioTest(manager.ScenarioTest):
|
|||||||
pass
|
pass
|
||||||
return node is not None
|
return node is not None
|
||||||
|
|
||||||
if (not tempest.test.call_until_true(
|
if (not test_utils.call_until_true(
|
||||||
_get_node, CONF.baremetal.association_timeout, 1)):
|
_get_node, CONF.baremetal.association_timeout, 1)):
|
||||||
msg = ('Timed out waiting to get Ironic node by instance id %s'
|
msg = ('Timed out waiting to get Ironic node by instance id %s'
|
||||||
% instance_id)
|
% instance_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user