mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Added authentication to AVM Crawler
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11225 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -26,7 +26,10 @@ package org.alfresco.repo.avm;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sf.acegisecurity.Authentication;
|
||||
|
||||
import org.alfresco.repo.avm.util.BulkLoader;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
|
||||
|
||||
/**
|
||||
@@ -72,6 +75,7 @@ public class AVMCrawlTestP extends AVMServiceTestBase
|
||||
*/
|
||||
private void testCrawl(int n, String fsPath, int m, long runTime)
|
||||
{
|
||||
Authentication authentication = AuthenticationUtil.setCurrentUser(AuthenticationUtil.SYSTEM_USER_NAME);
|
||||
try
|
||||
{
|
||||
if (m < 1)
|
||||
@@ -97,7 +101,7 @@ public class AVMCrawlTestP extends AVMServiceTestBase
|
||||
List<Thread> threads = new ArrayList<Thread>();
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
crawlers.add(new AVMCrawler(fService));
|
||||
crawlers.add(new AVMCrawler(fService, authentication));
|
||||
threads.add(new Thread(crawlers.get(i)));
|
||||
threads.get(i).start();
|
||||
}
|
||||
|
Reference in New Issue
Block a user