Skip to content

[Port to dtq-dev-93] Clear the cached curation tasks after CreateMissingIdentifiersIT (#1715) - #1717

Merged
milanmajchrak merged 1 commit into
dtq-dev-93from
93/be-port-1715-clear-curation-cache
Nov 24, 2026
Merged

milanmajchrak merged 1 commit into
dtq-dev-93from
93/be-port-1715-clear-curation-cache

Conversation

@Kasinhou

@Kasinhou Kasinhou commented Nov 19, 2026 •

Copy link
Copy Markdown

References

Description

HealthReportIT.testMetadataCheck and testMetadataCheckWithRestrictedReportSize fail depending on the order of the test classes. CreateMissingIdentifiersIT leaves the plugin service with a cached task list that holds only its own test task, so the metadataqa task can't be resolved later. The Metadata check then returns an empty report. The fix clears that cache after each test of CreateMissingIdentifiersIT.

Instructions for Reviewers

The two CI runs of #1711 (same code) confirm the cause:

Run Test classes between CreateMissingIdentifiersIT and HealthReportIT Result
44552250145 9 classes, none of them a curation test HealthReportIT 2 failures
44489559312 ItemMetadataQACheckerIT, CurationIT, ItemHandleCheckerIT… (they clear the plugin cache) pass
  • A single @After in CreateMissingIdentifiersIT. Test-only change, a clean cherry-pick of 7529871849.
  • How to test (fixed order, one JVM):
    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

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)
@Kasinhou Kasinhou self-assigned this Nov 19, 2026
@Kasinhou
Kasinhou requested review from milanmajchrak and a lite review from Copilot November 19, 2026 15:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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 @After cleanup 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

@milanmajchrak
milanmajchrak merged commit 9e5771e into dtq-dev-93 Nov 24, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants