mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for failing test BlogServiceImplTest. Problem was in test code - trying to delete sites via nodeService is not allowed.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28644 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -33,6 +33,7 @@ import org.alfresco.query.PagingRequest;
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.repo.policy.BehaviourFilter;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.site.SiteModel;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
@@ -174,7 +175,20 @@ public class BlogServiceImplTest
|
||||
|
||||
for (NodeRef node : nodesToDelete)
|
||||
{
|
||||
if (NODE_SERVICE.exists(node)) NODE_SERVICE.deleteNode(node);
|
||||
if (NODE_SERVICE.exists(node))
|
||||
{
|
||||
// st:site nodes can only be deleted via the SiteService
|
||||
if (NODE_SERVICE.getType(node).equals(SiteModel.TYPE_SITE))
|
||||
{
|
||||
|
||||
SiteInfo siteInfo = SITE_SERVICE.getSite(node);
|
||||
SITE_SERVICE.deleteSite(siteInfo.getShortName());
|
||||
}
|
||||
else
|
||||
{
|
||||
NODE_SERVICE.deleteNode(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user