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

[MODULES-3562] Implement retry for tests which require modules to pull key from keyserver #631

Merged
merged 2 commits into from
Oct 25, 2016

Conversation

wilson208
Copy link

This commit implements a function retry_on_error_matching and makes use of that function within tests which are pulling a key from 'hkps.pool.sks-keyservers.net'. These tests were failing occasionally in jenkins when the key server timed out. These changes implement a retry when the error returned is a timeout error.

Whilst making these changes, I found that the tests were incorrectly testing for idempotency so this has been fixed in the first commit.

# Params:
# - max_retry_count - Max number of retries
# - retry_wait_interval_secs - Number of seconds to wait before retry
# - error_matches - Matcher which the exception raised must match to allow retry
Copy link

Choose a reason for hiding this comment

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

did you mean for this to be "error_matcher"?

Copy link
Author

Choose a reason for hiding this comment

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

Have updated to amend that typo now @eputnam

@wilson208
Copy link
Author

Travis failures are due to the current issue with parallels version 2.10.0 requiring Ruby > 2.0 which is waiting to be addressed this sprint using modulesync across all modules. I didn't touch the module itself of spec tests, just acceptance.

@wilson208 wilson208 force-pushed the key-server-timeout-fix branch from dc697e9 to 57c7b88 Compare October 19, 2016 20:08
@DavidS DavidS merged commit 68cdcf7 into puppetlabs:master Oct 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants