diff options
author | Mehdi Abaakouk <mehdi.abaakouk@enovance.com> | 2015-04-17 17:37:34 +0200 |
---|---|---|
committer | Mehdi Abaakouk <mehdi.abaakouk@enovance.com> | 2015-04-24 07:19:45 +0200 |
commit | a8c06abdd6ea78869b8836f7d20bab63b4fe798b (patch) | |
tree | f942d6e8e49f734a404f7375f8330b6b3fbedb79 | |
parent | c7fd828cefe3947bdd89702f4af9b573a0ce60ca (diff) | |
download | oslo-messaging-a8c06abdd6ea78869b8836f7d20bab63b4fe798b.tar.gz |
Disable and mark heartbeat as experimental
Due to some discovered issues since heartbeat is enabled by default.
Specially #1436788, that needs to fix the underlying library, too.
So, according to the discution here:
https://bugs.launchpad.net/oslo.messaging/+bug/1436769/comments/10
We decide to mark the implementation as experimental and disable it by default.
Related-bug: #1436788
Related-bug: #1436769
Change-Id: Ib7c55977f976bdbbc8df4ad5915e0433cbf84a17
(cherry picked from commit 287a4f56f45ed9cd40116a9e7b6e529f3382a925)
-rw-r--r-- | oslo_messaging/_drivers/impl_rabbit.py | 4 | ||||
-rw-r--r-- | oslo_messaging/tests/drivers/test_impl_rabbit.py | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py index d4ca4af..ee641c7 100644 --- a/oslo_messaging/_drivers/impl_rabbit.py +++ b/oslo_messaging/_drivers/impl_rabbit.py @@ -123,10 +123,10 @@ rabbit_opts = [ 'If you change this option, you must wipe the ' 'RabbitMQ database.'), cfg.IntOpt('heartbeat_timeout_threshold', - default=60, + default=0, help="Number of seconds after which the Rabbit broker is " "considered down if heartbeat's keep-alive fails " - "(0 disable the heartbeat)."), + "(0 disable the heartbeat). EXPERIMENTAL"), cfg.IntOpt('heartbeat_rate', default=2, help='How often times during the heartbeat_timeout_threshold ' diff --git a/oslo_messaging/tests/drivers/test_impl_rabbit.py b/oslo_messaging/tests/drivers/test_impl_rabbit.py index 5f75ab4..3d81c70 100644 --- a/oslo_messaging/tests/drivers/test_impl_rabbit.py +++ b/oslo_messaging/tests/drivers/test_impl_rabbit.py @@ -58,6 +58,12 @@ class TestDeprecatedRabbitDriverLoad(test_utils.BaseTestCase): class TestHeartbeat(test_utils.BaseTestCase): + def setUp(self): + super(TestHeartbeat, self).setUp( + conf=cfg.ConfigOpts()) + self.config(heartbeat_timeout_threshold=60, + group='oslo_messaging_rabbit') + @mock.patch('oslo_messaging._drivers.impl_rabbit.LOG') @mock.patch('kombu.connection.Connection.heartbeat_check') @mock.patch('oslo_messaging._drivers.impl_rabbit.Connection.' @@ -164,7 +170,7 @@ class TestRabbitDriverLoadSSL(test_utils.BaseTestCase): transport._driver._get_connection() connection_klass.assert_called_once_with( 'memory:///', ssl=self.expected, login_method='AMQPLAIN', - heartbeat=60, failover_strategy="shuffle") + heartbeat=0, failover_strategy="shuffle") class TestRabbitIterconsume(test_utils.BaseTestCase): |