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
diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
index 5c805a9..e7f7aae 100644
--- a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
@@ -16,9 +16,9 @@
from tempest.common import waiters
from tempest import config
+from tempest.lib.common.utils import test_utils
from tempest.lib import exceptions as lib_exc
from tempest.scenario import manager # noqa
-import tempest.test
from ironic_tempest_plugin import clients
@@ -84,7 +84,7 @@
return True
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" %
(node_id, state_attr, target_states))
raise lib_exc.TimeoutException(msg)
@@ -110,7 +110,7 @@
pass
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)):
msg = ('Timed out waiting to get Ironic node by instance id %s'
% instance_id)