Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RabbitMQ] new health check #2711

Merged
merged 1 commit into from Aug 12, 2016
Merged

[RabbitMQ] new health check #2711

merged 1 commit into from Aug 12, 2016

Conversation

masci
Copy link
Contributor

@masci masci commented Jul 27, 2016

What does this PR do?

A new status check was added, rabbitmq.status that reflects the status of the RabbitMQ service (up/down), which is different from the outcome of the aliveness strategy that is still implemented by the existing rabbitmq.aliveness status check.

Motivation

The aliveness check is misleading when the RabbitMQ service is down - an exception is raised and the check simply provides no data whilst the info command, along with the UI correctly report an issue for the integration.

@truthbk truthbk self-assigned this Jul 28, 2016
check = RabbitMQ('rabbitmq', {}, {"instances": [{"rabbitmq_api_url": "http://example.com"}]})
r.get.side_effect = [requests.exceptions.HTTPError, ValueError]
self.assertRaises(RabbitMQException, check._get_data, '')
self.assertRaises(RabbitMQException, check._get_data, '')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

twice?

Copy link
Contributor Author

@masci masci Jul 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's to consume all the side_effects so we test it both with HTTPError (would be ok any requests exception) and ValueError

@truthbk
Copy link
Member

truthbk commented Jul 28, 2016

Love the tests ❤️ !

This looks great to me, just one comment. Otherwise :shipit:

@masci masci modified the milestones: 5.8.6, Triage Jul 29, 2016
@truthbk truthbk modified the milestones: 5.9.0, 5.8.6 Aug 12, 2016
@truthbk truthbk merged commit 4eb999d into master Aug 12, 2016
@truthbk truthbk deleted the massi/rabbit_check branch August 12, 2016 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants