diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-06-11 07:43:44 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-06-11 07:43:44 +0000 |
commit | faddbbe318cf62791624469c4304ae4fdcc2e639 (patch) | |
tree | 57607ade5c5e3a5d4ae6634f6f4e74d814bdaefb | |
parent | 6afd788f3eb21e90886bfe98e2bf66f2a829217d (diff) | |
parent | 1a9a744a853e838a202647bc7c5d393331083970 (diff) | |
download | oslo-faddbbe318cf62791624469c4304ae4fdcc2e639.tar.gz oslo-faddbbe318cf62791624469c4304ae4fdcc2e639.tar.xz oslo-faddbbe318cf62791624469c4304ae4fdcc2e639.zip |
Merge "MatchMakerStub - make it work & add test"
-rw-r--r-- | openstack/common/rpc/matchmaker.py | 2 | ||||
-rw-r--r-- | tests/unit/rpc/test_matchmaker.py | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/openstack/common/rpc/matchmaker.py b/openstack/common/rpc/matchmaker.py index fd10f27..98a8f43 100644 --- a/openstack/common/rpc/matchmaker.py +++ b/openstack/common/rpc/matchmaker.py @@ -341,7 +341,7 @@ class MatchMakerStub(MatchMakerBase): Will not work where knowledge of hosts is known (i.e. zeromq) """ def __init__(self): - super(MatchMakerLocalhost, self).__init__() + super(MatchMakerStub, self).__init__() self.add_binding(FanoutBinding(), StubExchange()) self.add_binding(DirectBinding(), StubExchange()) diff --git a/tests/unit/rpc/test_matchmaker.py b/tests/unit/rpc/test_matchmaker.py index 71688a4..5015600 100644 --- a/tests/unit/rpc/test_matchmaker.py +++ b/tests/unit/rpc/test_matchmaker.py @@ -53,3 +53,13 @@ class MatchMakerDirectExchangeTestCase(utils.BaseTestCase, common. self.driver = matchmaker.MatchMakerLocalhost() self.topic = "test.localhost" self.hosts = ['localhost'] + + +class MatchMakerStubTestCase(utils.BaseTestCase, + common._MatchMakerDirectedTopicTestCase): + """Test lookups against the stub/no-op matchmaker.""" + def setUp(self): + super(MatchMakerStubTestCase, self).setUp() + self.driver = matchmaker.MatchMakerStub() + self.topic = "test.localhost" + self.hosts = ['localhost'] |