Add TimerTestCase missing tests case
A tests case class have been missed is the namespace removal changes. Change-Id: Ie2984260fc6ab74c5766d73c98dd9b1d05d8ee2d
This commit is contained in:
parent
408d0da9be
commit
0c49f0d0ca
@ -13,6 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_messaging._drivers import common
|
||||
from oslo_messaging import _utils as utils
|
||||
from oslo_messaging.tests import utils as test_utils
|
||||
|
||||
@ -47,3 +48,17 @@ class VersionIsCompatibleTestCase(test_utils.BaseTestCase):
|
||||
|
||||
def test_version_is_compatible_no_rev_is_zero(self):
|
||||
self.assertTrue(utils.version_is_compatible('1.23.0', '1.23'))
|
||||
|
||||
|
||||
class TimerTestCase(test_utils.BaseTestCase):
|
||||
def test_duration_is_none(self):
|
||||
t = common.DecayingTimer()
|
||||
t.start()
|
||||
remaining = t.check_return(None)
|
||||
self.assertEqual(None, remaining)
|
||||
|
||||
def test_duration_is_none_and_maximun_set(self):
|
||||
t = common.DecayingTimer()
|
||||
t.start()
|
||||
remaining = t.check_return(None, maximum=2)
|
||||
self.assertEqual(2, remaining)
|
||||
|
Loading…
x
Reference in New Issue
Block a user