dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

GDCC/Harvesting server it test failing

Open qqmyers opened this issue 2 years ago • 1 comments

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 was Waited 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:

qqmyers avatar Oct 05 '22 21:10 qqmyers

Coverage Status

Coverage increased (+0.001%) to 19.982% when pulling 23cc663074ef48275e78be35ef59cb1966cf3378 on GlobalDataverseCommunityConsortium:GDCC/HarvestingServerIT_test_failing into 11abccfb61d28e3b9e0695cb7be85d775a83ce59 on IQSS:develop.

coveralls avatar Oct 05 '22 21:10 coveralls

Grooming:

  • Moved this to "been in sprint"

mreekie avatar Jan 09 '23 13:01 mreekie