diff --git a/dspace-api/src/test/java/org/dspace/ctask/general/CreateMissingIdentifiersIT.java b/dspace-api/src/test/java/org/dspace/ctask/general/CreateMissingIdentifiersIT.java index 5013f2cb6690..ccb2aff6142b 100644 --- a/dspace-api/src/test/java/org/dspace/ctask/general/CreateMissingIdentifiersIT.java +++ b/dspace-api/src/test/java/org/dspace/ctask/general/CreateMissingIdentifiersIT.java @@ -28,6 +28,7 @@ import org.dspace.identifier.VersionedHandleIdentifierProviderWithCanonicalHandles; import org.dspace.services.ConfigurationService; import org.dspace.services.factory.DSpaceServicesFactory; +import org.junit.After; import org.junit.Test; /** @@ -44,6 +45,13 @@ public class CreateMissingIdentifiersIT private ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService(); + @After + public void clearCachedTasks() { + // The base class resets the config after each test, but the plugin service would still cache + // only the "test" task, so later tests could not resolve their curation tasks. + CoreServiceFactory.getInstance().getPluginService().clearNamedPluginClasses(); + } + @Test public void testPerform() throws IOException {