Skip to content

fix(config-manager): Fixes polling interval and blocking timeout issues #187

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

Merged
merged 4 commits into from
Jul 25, 2019

Conversation

rashidsp
Copy link
Contributor

@rashidsp rashidsp commented Jul 25, 2019

Summary

  • Validates upper limit of polling interval & blocking timeout.
  • Adds relative log messages

Test plan

  • Adds/Updates unit tests

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 99.518% when pulling 4688226 on rashid/fix-default-time-issue into efe3a06 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 99.518% when pulling 4688226 on rashid/fix-default-time-issue into efe3a06 on master.

@coveralls
Copy link

coveralls commented Jul 25, 2019

Coverage Status

Coverage increased (+0.03%) to 99.518% when pulling e6c3a78 on rashid/fix-default-time-issue into efe3a06 on master.

@rashidsp rashidsp requested a review from a team July 25, 2019 16:11
if polling_interval.nil?
@logger.log(
Logger::DEBUG,
"Polling interval is not given. Defaulting to #{Helpers::Constants::CONFIG_MANAGER['DEFAULT_UPDATE_INTERVAL']}."
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: ... not provided

@polling_interval = Helpers::Constants::CONFIG_MANAGER['DEFAULT_UPDATE_INTERVAL']
unless polling_interval.is_a? Integer
@logger.log(
Logger::DEBUG,
Copy link
Contributor

Choose a reason for hiding this comment

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

This and the next lot should be error level logs


unless blocking_timeout.is_a? Integer
@logger.log(
Logger::DEBUG,
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing regarding error level logs

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a comment

Choose a reason for hiding this comment

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

lgtm @msohailhussain can you also take a look

unless polling_interval.between?(Helpers::Constants::CONFIG_MANAGER['MIN_SECONDS_LIMIT'], Helpers::Constants::CONFIG_MANAGER['MAX_SECONDS_LIMIT'])
@logger.log(
Logger::DEBUG,
"Polling interval '#{polling_interval}' has invalid range. Defaulting to #{Helpers::Constants::CONFIG_MANAGER['DEFAULT_UPDATE_INTERVAL']}."
Copy link
Contributor

Choose a reason for hiding this comment

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

measurement unit would be good for all logs
Defaulting to #{Helpers::Constants::CONFIG_MANAGER['DEFAULT_UPDATE_INTERVAL']}. seconds

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep we should specify the unit

@mikeproeng37 mikeproeng37 merged commit a00eba2 into master Jul 25, 2019
@rashidsp rashidsp deleted the rashid/fix-default-time-issue branch August 29, 2019 19:13
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.

5 participants