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: If8985f511d434af0449992b2bc3540da9b3a0591
(cherry picked from commit d46c28b30c)
This commit is contained in:
Ken'ichi Ohmichi 2017-02-09 10:22:35 -08:00 committed by Julien Danjou
parent 6d1deb5c50
commit 789d47d009
2 changed files with 8 additions and 6 deletions

View File

@ -17,6 +17,7 @@
from oslo_log import log as logging
from tempest.common.utils import data_utils
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest import test
from ceilometer.tests.tempest.service import client
@ -113,11 +114,12 @@ class TestObjectStorageTelemetry(test.BaseTestCase):
return (container_name in containers and obj_name in objects)
self.assertTrue(test.call_until_true(_check_samples,
NOTIFICATIONS_WAIT,
NOTIFICATIONS_SLEEP),
'Correct notifications were not received after '
'%s seconds.' % NOTIFICATIONS_WAIT)
self.assertTrue(
test_utils.call_until_true(_check_samples,
NOTIFICATIONS_WAIT,
NOTIFICATIONS_SLEEP),
'Correct notifications were not received after '
'%s seconds.' % NOTIFICATIONS_WAIT)
def create_container(self):
name = data_utils.rand_name('swift-scenario-container')

View File

@ -26,7 +26,7 @@ testtools>=1.4.0 # MIT
gabbi>=1.11.0 # Apache-2.0
requests-aws>=0.1.4 # BSD License (3 clause)
os-testr>=0.4.1 # Apache-2.0
tempest>=11.0.0 # Apache-2.0
tempest>=14.0.0 # Apache-2.0
WebTest>=2.0 # MIT
pifpaf>=0.0.11
os-api-ref>=0.1.0 # Apache-2.0s