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

Add definition validation and munge for ha-sync-batch-size #489

Closed

Conversation

circuitousNerd
Copy link

With the release of RabbitMQ 3.6 there is an option to set the ha-sync-batch-size.
This option takes an integer >0. This commit adds a validation statement to check
the supplied value is an integer and then converts the string input into an
integer.

Chris Lord and others added 2 commits July 28, 2016 14:33
With the release of RabbitMQ 3.6 there is an option to set the ha-sync-batch-size.
This option takes an integer >0. This commit adds a validation statement to check
the supplied value is an integer and then converts the string input into an
integer.
Add missing _ that was causing failures.
@circuitousNerd
Copy link
Author

I'm not sure how what I changed has caused tests to fail. Would someone with more experience be able to help me figure out why?

if definition.key? 'ha-sync-batch-size'
ha_sync_batch_size_val = definition['ha-sync-batch-size']
unless ha_sync_batch_size_val.to_i.tos == ha_sync_batch_size_val
raise ArgumentErro, "Invalid ha-sync-batch-size value '#{ha_sync_batch_size_val}'"
Copy link
Contributor

Choose a reason for hiding this comment

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

raise ArgumentError

@mxftw
Copy link
Contributor

mxftw commented Aug 23, 2016

@combatdud3 You have a typo in raise ArgumentError.
I fixed that in my PR #500 and added a Test for it.

@mxftw
Copy link
Contributor

mxftw commented Aug 23, 2016

#500

@circuitousNerd circuitousNerd deleted the ha-sync-batch-size branch August 25, 2016 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants