mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
77193: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 74588: Revert of R 74318 ACE-1996 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@78049 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -23,7 +23,6 @@ import static org.junit.Assert.assertNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.cache.MemoryCache;
|
||||
@@ -34,10 +33,6 @@ import org.alfresco.repo.tenant.SingleTServiceImpl;
|
||||
import org.alfresco.repo.tenant.TenantService;
|
||||
import org.alfresco.repo.tenant.TenantUtil;
|
||||
import org.alfresco.repo.tenant.TenantUtil.TenantRunAsWork;
|
||||
import org.alfresco.util.DynamicallySizedThreadPoolExecutor;
|
||||
import org.alfresco.util.TraceableThreadFactory;
|
||||
import org.alfresco.util.ThreadPoolExecutorFactoryBean;
|
||||
import org.alfresco.util.cache.DefaultAsynchronouslyRefreshedCacheRegistry;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.dictionary.TypeDefinition;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -45,7 +40,6 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author sglover
|
||||
@@ -70,7 +64,7 @@ public class DictionaryDAOTest
|
||||
this.dictionaryDAO = new DictionaryDAOImpl();
|
||||
dictionaryDAO.setTenantService(tenantService);
|
||||
|
||||
initDictionaryCaches(dictionaryDAO, tenantService);
|
||||
initDictionaryCaches(dictionaryDAO);
|
||||
|
||||
new AuthenticationUtil().afterPropertiesSet();
|
||||
|
||||
@@ -93,27 +87,19 @@ public class DictionaryDAOTest
|
||||
service = component;
|
||||
}
|
||||
|
||||
private void initDictionaryCaches(DictionaryDAOImpl dictionaryDAO, TenantService tenantService) throws Exception
|
||||
private void initDictionaryCaches(DictionaryDAOImpl dictionaryDAO)
|
||||
{
|
||||
CompiledModelsCache compiledModelsCache = new CompiledModelsCache();
|
||||
compiledModelsCache.setDictionaryDAO(dictionaryDAO);
|
||||
compiledModelsCache.setTenantService(tenantService);
|
||||
compiledModelsCache.setRegistry(new DefaultAsynchronouslyRefreshedCacheRegistry());
|
||||
ThreadPoolExecutorFactoryBean threadPoolfactory = new ThreadPoolExecutorFactoryBean();
|
||||
threadPoolfactory.afterPropertiesSet();
|
||||
compiledModelsCache.setThreadPoolExecutor((ThreadPoolExecutor) threadPoolfactory.getObject());
|
||||
dictionaryDAO.setDictionaryRegistryCache(compiledModelsCache);
|
||||
dictionaryDAO.init();
|
||||
dictionaryDAO.setDictionaryRegistryCache(new MemoryCache<String, DictionaryRegistry>());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBootstrap() throws Exception
|
||||
public void testBootstrap()
|
||||
{
|
||||
TenantService tenantService = new SingleTServiceImpl();
|
||||
|
||||
DictionaryDAOImpl dictionaryDAO = new DictionaryDAOImpl();
|
||||
dictionaryDAO.setTenantService(tenantService);
|
||||
initDictionaryCaches(dictionaryDAO, tenantService);
|
||||
initDictionaryCaches(dictionaryDAO);
|
||||
|
||||
DictionaryBootstrap bootstrap = new DictionaryBootstrap();
|
||||
List<String> bootstrapModels = new ArrayList<String>();
|
||||
|
Reference in New Issue
Block a user