[MNT-21818] Perform cache cleaning after each test is run

This commit is contained in:
tiagos
2020-09-11 01:39:29 +01:00
parent 213e3a3889
commit f25c804a54
3 changed files with 18 additions and 0 deletions

View File

@@ -346,4 +346,9 @@ public interface FilePlanService
*/
NodeRef createRecordCategory(NodeRef parent, String name, Map<QName, Serializable> properties);
/**
* Clears the records management root node cache
*/
void clearRootRecordsManagementCache();
}

View File

@@ -177,6 +177,14 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
this.rootContainerCache = rootContainerCache;
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#clearRootRecordsManagementCache()
*/
public void clearRootRecordsManagementCache()
{
this.rootContainerCache.clear();
}
/**
* @param rootRecordsManagementCache root records management node cache
*/

View File

@@ -458,6 +458,11 @@ public abstract class BaseRMTestCase extends RetryingTransactionHelperTestCase
filter.disableBehaviour();
try
{
if (filePlanService != null)
{
filePlanService.clearRootRecordsManagementCache();
}
if (filePlan != null && nodeService.exists(filePlan))
{
List<NodeRef> holds = holdService.getHolds(filePlan);