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: Ie1ecf45962dafb8b46f1bd138a2d44521c8eff67
(cherry picked from commit d959f5f2dd)
This commit is contained in:
Ken'ichi Ohmichi 2017-02-09 09:48:12 -08:00 committed by wangxiyuan
parent f196f9a8a9
commit 470378067c

View File

@ -17,8 +17,8 @@ import json
import uuid
from tempest.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest import test
from zaqar.tests.tempest_plugin.tests import base
@ -134,7 +134,7 @@ class TestSubscriptions(base.BaseV2MessagingTest):
message_body = self.generate_message_body()
self.post_messages(queue_name=self.queue_name, rbody=message_body)
if not test.call_until_true(
if not test_utils.call_until_true(
lambda: self.list_messages(sub_queue)[1]['messages'], 10, 1):
self.fail("Couldn't get messages")
_, body = self.list_messages(sub_queue)