Skip to content

Commit

Permalink
Disable and mark heartbeat as experimental
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Mehdi Abaakouk committed Apr 17, 2015
1 parent 9dd8441 commit 287a4f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions oslo_messaging/_drivers/impl_rabbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@
'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 '
Expand Down
8 changes: 7 additions & 1 deletion oslo_messaging/tests/drivers/test_impl_rabbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def test_driver_load(self):

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.'
Expand Down Expand Up @@ -164,7 +170,7 @@ def test_driver_load(self, connection_klass, fake_ensure):
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):
Expand Down

0 comments on commit 287a4f5

Please sign in to comment.