intermittent harvest tests failures #9240#9520
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
When the tests in HarvestingClientsIT were creating clients, they would use a random string 6 characters long for the identifier. Our "random strings" are random numbers in hex. But the identifier in this particular class has the constraint such that the string should not contain decimal digits only. So with the generation method above, the expected probability of a constraint violation should therefore be 0.625^6 = roughly 5.96% of the time. Which seems about right, as to the failure rate we've been seeing.
I'm pretty sure we've run into this with dataverse aliases in the past.
Which issue(s) this PR closes:
Closes #9240
Special notes for your reviewer:
I acknowledge that it's not awesome, the behavior of the api - the 500 it throws because of the constraint. I just wanted to keep this pr purely about fixing the test. The harvesting clients api in question is for admins only; and nobody will ever use it particularly frequently. So maybe we can fix this error handling one day... when everything else in the application is fixed.
Suggestions on how to test this:
Seeing how the natural probability of failure was really low (i.e., it would keep passing most of the times if left as is), it would be difficult to confirm for sure that it's not going to happen again, ever. Just confirming that the test passes in the next jenkins run should be QA enough to merge it. If it starts failing again for whatever reason, we'll know soon enough.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?:
Additional documentation: