Merge "Fail quickly if there on bad password"

This commit is contained in:
Jenkins 2016-03-02 08:54:10 +00:00 committed by Gerrit Code Review
commit 363c591ffb
2 changed files with 17 additions and 4 deletions

View File

@ -522,6 +522,10 @@ class Connection(object):
failover_strategy=self.kombu_failover_strategy, failover_strategy=self.kombu_failover_strategy,
transport_options={ transport_options={
'confirm_publish': True, 'confirm_publish': True,
'client_properties': {'capabilities': {
'authentication_failure_close': True,
'connection.blocked': True,
'consumer_cancel_notify': True}},
'on_blocked': self._on_connection_blocked, 'on_blocked': self._on_connection_blocked,
'on_unblocked': self._on_connection_unblocked, 'on_unblocked': self._on_connection_unblocked,
}, },

View File

@ -191,11 +191,20 @@ class TestRabbitDriverLoadSSL(test_utils.BaseTestCase):
transport._driver._get_connection() transport._driver._get_connection()
connection_klass.assert_called_once_with( connection_klass.assert_called_once_with(
'memory:///', transport_options={'confirm_publish': True, 'memory:///', transport_options={
'on_blocked': mock.ANY, 'client_properties': {
'on_unblocked': mock.ANY}, 'capabilities': {
'connection.blocked': True,
'consumer_cancel_notify': True,
'authentication_failure_close': True
}
},
'confirm_publish': True,
'on_blocked': mock.ANY,
'on_unblocked': mock.ANY},
ssl=self.expected, login_method='AMQPLAIN', ssl=self.expected, login_method='AMQPLAIN',
heartbeat=60, failover_strategy='round-robin') heartbeat=60, failover_strategy='round-robin'
)
class TestRabbitPublisher(test_utils.BaseTestCase): class TestRabbitPublisher(test_utils.BaseTestCase):