Repository navigation
[Port to dtq-dev-93] Clear the cached curation tasks after CreateMissingIdentifiersIT (#1715) - #1717
Merged
Conversation
The test leaves the plugin service with only its "test" task. A test that runs later in the same JVM then cannot resolve the configured tasks, so CurationIT (noop) and HealthReportIT (metadataqa) fail depending on the test order. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 7529871)
There was a problem hiding this comment.
🟢 Approval recommended
The test-only change adds post-test cache cleanup to prevent curation-task configuration from leaking between integration tests and causing order-dependent failures.
No open issues 🎉
What changed in this PR
This test-only change prevents order-dependent integration-test failures by clearing cached named curation tasks after each CreateMissingIdentifiersIT test.
Changes:
- Added an
@Aftercleanup method to clear the plugin service's named-plugin cache. - Prevented dynamically configured curation tasks from leaking into subsequent integration tests.
| File | Description |
|---|---|
| dspace-api/src/test/java/org/dspace/ctask/general/CreateMissingIdentifiersIT.java | Adds post-test cleanup to clear cached named curation-task plugins and prevent test configuration leakage. |
Review effort: Lite
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.
References
dtq-dev-9-base) todtq-dev-93. Same fix as Clear the cached curation tasks after CreateMissingIdentifiersIT #1690 ondtq-dev.dtq-dev-93after the CI restore ([dtq-dev-93] Restore dataquest CI/CD workflows removed for the UFAL handoff #1711): https://github.com/dataquest-dev/DSpace/actions/runs/44552250145/job/135658810134Description
HealthReportIT.testMetadataCheckandtestMetadataCheckWithRestrictedReportSizefail depending on the order of the test classes.CreateMissingIdentifiersITleaves the plugin service with a cached task list that holds only its owntesttask, so themetadataqatask can't be resolved later. The Metadata check then returns an empty report. The fix clears that cache after each test ofCreateMissingIdentifiersIT.Instructions for Reviewers
The two CI runs of #1711 (same code) confirm the cause:
CreateMissingIdentifiersITandHealthReportITHealthReportIT2 failuresItemMetadataQACheckerIT,CurationIT,ItemHandleCheckerIT… (they clear the plugin cache)@AfterinCreateMissingIdentifiersIT. Test-only change, a clean cherry-pick of7529871849.mvn verify -pl dspace-api,dspace-server-webapp,dspace -am -DskipIntegrationTests=false -Dit.test=CreateMissingIdentifiersIT,HealthReportIT -Dfailsafe.runOrder=alphabetical -Dfailsafe.failIfNoSpecifiedTests=false🤖 Generated with Claude Code