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: Ib5a34cafd85015609c2f23d5b4d964604a0693c3
Needed-by: Ide11a7434a4714e5d2211af1803333535f557370
This commit is contained in:
ghanshyam 2017-02-14 00:09:44 +00:00 committed by Ghanshyam Mann
parent b40a257e07
commit 182df8ec28
1 changed files with 4 additions and 4 deletions

View File

@ -26,8 +26,8 @@ import testtools
from tempest.common.utils.linux import remote_client
from tempest import config
from tempest import exceptions
from tempest.lib.common.utils import test_utils
from tempest import manager
import tempest.test
CONF = config.CONF
LOG = logging.getLogger("tempest.thirdparty.gce")
@ -159,7 +159,7 @@ class GCESmokeTestCase(testtools.TestCase):
try:
opLink = body["selfLink"]
result = tempest.test.call_until_true(check, timeout, idle)
result = test_utils.call_until_true(check, timeout, idle)
if not result:
msg = ("Timed out waiting for deletion resource %s"
% targetLink)
@ -222,7 +222,7 @@ class GCESmokeTestCase(testtools.TestCase):
timeout = CONF.gceapi.operation_timeout
idle = CONF.gceapi.operation_interval
result = tempest.test.call_until_true(check, timeout, idle)
result = test_utils.call_until_true(check, timeout, idle)
if not result:
message = "Timed out waiting for uri %s" % targetLink
raise exceptions.TimeoutException(message)
@ -276,7 +276,7 @@ class GCESmokeTestCase(testtools.TestCase):
proc.wait()
return True if proc.returncode == 0 else False
result = tempest.test.call_until_true(
result = test_utils.call_until_true(
ping, CONF.compute.ping_timeout, 1)
if result:
return