diff --git a/oslo_messaging/conffixture.py b/oslo_messaging/conffixture.py index 0d05a5881..bb037b8db 100644 --- a/oslo_messaging/conffixture.py +++ b/oslo_messaging/conffixture.py @@ -128,7 +128,7 @@ class ConfFixture(fixtures.Fixture): @transport_driver.setter def transport_driver(self, value): - self.conf.set_override('rpc_backend', value) + self.conf.set_override('rpc_backend', value, enforce_type=True) @property def response_timeout(self): @@ -137,4 +137,5 @@ class ConfFixture(fixtures.Fixture): @response_timeout.setter def response_timeout(self, value): - self.conf.set_override('rpc_response_timeout', value) + self.conf.set_override('rpc_response_timeout', value, + enforce_type=True) diff --git a/oslo_messaging/tests/rpc/test_client.py b/oslo_messaging/tests/rpc/test_client.py index c5b7364d8..ebb72324b 100644 --- a/oslo_messaging/tests/rpc/test_client.py +++ b/oslo_messaging/tests/rpc/test_client.py @@ -221,7 +221,7 @@ class TestCallTimeout(test_utils.BaseTestCase): ('all_none', dict(confval=None, ctor=None, prepare=_notset, expect=None)), ('confval', - dict(confval=21.1, ctor=None, prepare=_notset, expect=21.1)), + dict(confval=21, ctor=None, prepare=_notset, expect=21)), ('ctor', dict(confval=None, ctor=21.1, prepare=_notset, expect=21.1)), ('ctor_zero', diff --git a/oslo_messaging/tests/utils.py b/oslo_messaging/tests/utils.py index eacfaedc8..aa2a56343 100644 --- a/oslo_messaging/tests/utils.py +++ b/oslo_messaging/tests/utils.py @@ -57,7 +57,7 @@ class BaseTestCase(base.BaseTestCase): """ group = kw.pop('group', None) for k, v in six.iteritems(kw): - self.conf.set_override(k, v, group) + self.conf.set_override(k, v, group, enforce_type=True) class ServerThreadHelper(threading.Thread):