GDCC/Harvesting server it test failing#9026
Merged
kcondon merged 20 commits intoIQSS:developfrom Nov 30, 2022
Merged
Conversation
pdurbin
approved these changes
Nov 30, 2022
|
Grooming:
|
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: Possible repeat of #8937 - the testOaiFunctionality() test is still occasionally failing, as in #9001. After trying various experiments and discovering that Oai/this test rely on the metadata exports being created after publication, I made a modified copy of the UtilIT.sleepForReindex to sleepForReexport(). This call will wait up to the defined limit (in seconds) for metadata exports to be complete. From a number of test runs, it appears that doing this can avoid the error, and allows removal of a 5 second delay that was in prior code. The PR also adds a loop to retry the call to find the exported set in case there is a delay there. Lastly, a minor tweak was added to make sleepFor* take a maximum delay in seconds rather than a loop count.
Which issue(s) this PR closes:
Closes #8937
Special notes for your reviewer: Hopefully the sleepForReindex and possibly the sleepForReexport method can be reused elsewhere to avoid fixed delays. FWIW: In one run, I see
Waited 2.5 seconds for export, the next wasWaited 3.5 seconds for export. Given the original code waited 3 seconds here, it makes sense that it was an occasional issue.Suggestions on how to test this: Assure the test passes in this PR. Not sure how to test whether it is better than the old code without deploying it to other branches, but given that the test works here, I'm not sure such additional testing is needed.
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: