summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEric Windisch <eric@cloudscaling.com>2013-02-01 11:08:37 -0500
committerEric Windisch <eric@cloudscaling.com>2013-02-10 09:43:54 -0500
commit4a1ec2169d0a75afffc61437735dfb3959530bc5 (patch)
treeb92b5b3181e613a2d1d6707a680988bbd3e3de35 /tests
parentbd5d9f08ecc3c1fade6dce809ee9edef1c226e54 (diff)
Support testing args for LocalhostMatchMaker.
The matchmaker should return the correct direct topics used by the RPC driver. The LocalhostMatchMaker was always returning 'localhost', even though our tests might use '127.0.0.1' instead. Now, the LocalhostMatchmaker will use whatever value it is told should be considered local. MatchMakerLocalhost and LocalhostExchange now take an optional host parameter. impl_zmq._get_matchmaker now passes arguments to the selected matchmaker module. The test_zmq now initializes the matchmaker, using the host '127.0.0.1' Change-Id: I8daa2c0668f1d717eb95ab56009612b8b60f0a15
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/rpc/test_zmq.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/rpc/test_zmq.py b/tests/unit/rpc/test_zmq.py
index 2aac2b3..1de78e7 100644
--- a/tests/unit/rpc/test_zmq.py
+++ b/tests/unit/rpc/test_zmq.py
@@ -69,6 +69,7 @@ class _RpcZmqBaseTestCase(common.BaseRpcTestCase):
self.config(rpc_zmq_bind_address='127.0.0.1')
self.config(rpc_zmq_host='127.0.0.1')
self.config(rpc_response_timeout=5)
+ self.rpc._get_matchmaker(host='127.0.0.1')
# We'll change this if we detect no daemon running.
ipc_dir = FLAGS.rpc_zmq_ipc_dir
@@ -116,5 +117,5 @@ class RpcZmqDirectTopicTestCase(_RpcZmqBaseTestCase):
"""
def setUp(self):
super(RpcZmqDirectTopicTestCase, self).setUp(
- topic='test.localhost',
- topic_nested='nested.localhost')
+ topic='test.127.0.0.1',
+ topic_nested='nested.127.0.0.1')