diff options
author | Kiall Mac Innes <kiall@hp.com> | 2013-06-28 21:14:26 +0100 |
---|---|---|
committer | Kiall Mac Innes <kiall@hp.com> | 2013-07-08 11:27:01 +0100 |
commit | c37f6aaab3ac00b7865dee18158114433350237e (patch) | |
tree | 2e43ded39aa3bfb3d759f23c38114d119d480f0a /tests | |
parent | bc7e5c8996c1c16a90defc65519f8497e345d91d (diff) | |
download | oslo-c37f6aaab3ac00b7865dee18158114433350237e.tar.gz oslo-c37f6aaab3ac00b7865dee18158114433350237e.tar.xz oslo-c37f6aaab3ac00b7865dee18158114433350237e.zip |
Add support for heartbeating in the kombu RPC driver
This aides in detecting connection interruptions that would otherwise
go unnoticed.
Fixes bug #856764
Change-Id: Id4eb3d36036969b62890175d6a33b4e304be0527
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/rpc/test_kombu.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/unit/rpc/test_kombu.py b/tests/unit/rpc/test_kombu.py index c8c3f32..470f98a 100644 --- a/tests/unit/rpc/test_kombu.py +++ b/tests/unit/rpc/test_kombu.py @@ -362,7 +362,8 @@ class RpcKombuTestCase(amqp.BaseRpcAMQPTestCase): 'password': FLAGS.rabbit_password, 'port': FLAGS.rabbit_port, 'virtual_host': FLAGS.rabbit_virtual_host, - 'transport': 'memory'}]) + 'transport': 'memory', + 'heartbeat': FLAGS.rabbit_heartbeat}]) def topic_send(_context, topic, msg): pass @@ -382,7 +383,8 @@ class RpcKombuTestCase(amqp.BaseRpcAMQPTestCase): 'password': 'fake_password', 'hostname': 'fake_hostname', 'port': 31337, - 'virtual_host': 'fake_virtual_host'} + 'virtual_host': 'fake_virtual_host', + 'heartbeat': FLAGS.rabbit_heartbeat} class MyConnection(impl_kombu.Connection): def __init__(myself, *args, **kwargs): @@ -394,7 +396,8 @@ class RpcKombuTestCase(amqp.BaseRpcAMQPTestCase): 'password': server_params['password'], 'port': server_params['port'], 'virtual_host': server_params['virtual_host'], - 'transport': 'memory'}]) + 'transport': 'memory', + 'heartbeat': FLAGS.rabbit_heartbeat}]) def topic_send(_context, topic, msg): pass @@ -736,25 +739,29 @@ class RpcKombuHATestCase(utils.BaseTestCase): 'password': FLAGS.rabbit_password, 'port': 1234, 'virtual_host': FLAGS.rabbit_virtual_host, - 'transport': 'memory'}, + 'transport': 'memory', + 'heartbeat': FLAGS.rabbit_heartbeat}, {'hostname': 'host2', 'userid': FLAGS.rabbit_userid, 'password': FLAGS.rabbit_password, 'port': 5678, 'virtual_host': FLAGS.rabbit_virtual_host, - 'transport': 'memory'}, + 'transport': 'memory', + 'heartbeat': FLAGS.rabbit_heartbeat}, {'hostname': '::1', 'userid': FLAGS.rabbit_userid, 'password': FLAGS.rabbit_password, 'port': 2345, 'virtual_host': FLAGS.rabbit_virtual_host, - 'transport': 'memory'}, + 'transport': 'memory', + 'heartbeat': FLAGS.rabbit_heartbeat}, {'hostname': '2001:0db8:85a3:0042:0000:8a2e:0370:7334', 'userid': FLAGS.rabbit_userid, 'password': FLAGS.rabbit_password, 'port': 5672, 'virtual_host': FLAGS.rabbit_virtual_host, - 'transport': 'memory'}, + 'transport': 'memory', + 'heartbeat': FLAGS.rabbit_heartbeat}, ] } |