diff options
author | Eric Windisch <eric@cloudscaling.com> | 2013-02-12 11:46:24 -0500 |
---|---|---|
committer | Eric Windisch <eric@cloudscaling.com> | 2013-02-19 14:47:38 -0500 |
commit | f1e5d569b6c9ceb6d7a4b338db9186e4f9c2fb7b (patch) | |
tree | 784e131dc3bdd1cbce62c5b0d3516a6a70c93e23 /tests/unit/rpc | |
parent | 83162508572a494a169a319651e1d75d582618d7 (diff) | |
download | oslo-f1e5d569b6c9ceb6d7a4b338db9186e4f9c2fb7b.tar.gz oslo-f1e5d569b6c9ceb6d7a4b338db9186e4f9c2fb7b.tar.xz oslo-f1e5d569b6c9ceb6d7a4b338db9186e4f9c2fb7b.zip |
Support RPC envelopes in impl_zmq
This patch began as a set
of tests verifying the functionality of
sending and receiving RPC envelopes when
using impl_zmq. It was discovered that
when enabled, RPC envelopes were not
actually working,
The ZeroMQ driver includes its own envelopes.
This patch introduce versioning to that
envelope, eliminating the previously reserved
'style' field.
A new iteration of the zeromq-envelope is
introduced, 'impl_zmq_v2'. It specifies
that the zeromq-envelope should be followed
by an unpacked array representing key value
pairs of the standard RPC Envelope.
Because the key-values of the RPC Envelope
can be successfully transformed with bytes(),
this prevents the need to double-serialize
the content traversing the message bus.
Also removes some unused imports.
Closes bug 1123709
Closes bug 1055446
Change-Id: Ib04e3d092c9596146f1048d3502ac248496d313b
Diffstat (limited to 'tests/unit/rpc')
-rw-r--r-- | tests/unit/rpc/test_zmq.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/unit/rpc/test_zmq.py b/tests/unit/rpc/test_zmq.py index 8c9a966..7a1e501 100644 --- a/tests/unit/rpc/test_zmq.py +++ b/tests/unit/rpc/test_zmq.py @@ -30,8 +30,7 @@ from oslo.config import cfg from openstack.common import exception from openstack.common.gettextutils import _ -from openstack.common import processutils -from openstack.common import rpc +from openstack.common.rpc import common as rpc_common from tests.unit.rpc import common try: @@ -110,6 +109,15 @@ class RpcZmqBaseTopicTestCase(_RpcZmqBaseTestCase): pass +class RpcZmqEnvelopeEnabledTestCase(_RpcZmqBaseTestCase): + """ + This sends messages with envelopes enabled. + """ + def setUp(self): + super(RpcZmqEnvelopeEnabledTestCase, self).setUp() + self.stubs.Set(rpc_common, '_SEND_RPC_ENVELOPE', True) + + class RpcZmqDirectTopicTestCase(_RpcZmqBaseTestCase): """ Test communication directly to a host, |