mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-10374 Fixed failing MultiTDemoTest.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30796 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1109,55 +1109,55 @@ public class MultiTDemoTest extends TestCase
|
|||||||
|
|
||||||
public void testCustomModels()
|
public void testCustomModels()
|
||||||
{
|
{
|
||||||
// logger.info("test custom models");
|
logger.info("test custom models");
|
||||||
//
|
|
||||||
// final int defaultModelCnt = dictionaryService.getAllModels().size();
|
final int defaultModelCnt = dictionaryService.getAllModels().size();
|
||||||
//
|
|
||||||
// for (final String tenantDomain : tenants)
|
for (final String tenantDomain : tenants)
|
||||||
// {
|
{
|
||||||
// final String tenantAdminName = tenantService.getDomainUser(AuthenticationUtil.getAdminUserName(), tenantDomain);
|
final String tenantAdminName = tenantService.getDomainUser(AuthenticationUtil.getAdminUserName(), tenantDomain);
|
||||||
//
|
|
||||||
// AuthenticationUtil.runAs(new RunAsWork<Object>()
|
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||||
// {
|
{
|
||||||
// public Object doWork() throws Exception
|
public Object doWork() throws Exception
|
||||||
// {
|
{
|
||||||
// // no custom models should be deployed yet (note: will fail if re-run)
|
// no custom models should be deployed yet (note: will fail if re-run)
|
||||||
// assertEquals(0, repoAdminService.getModels().size());
|
assertEquals(0, repoAdminService.getModels().size());
|
||||||
// assertEquals(defaultModelCnt, dictionaryService.getAllModels().size());
|
assertEquals(defaultModelCnt, dictionaryService.getAllModels().size());
|
||||||
// assertNull(dictionaryService.getClass(QName.createQName("{my.new.model}sop")));
|
assertNull(dictionaryService.getClass(QName.createQName("{my.new.model}sop")));
|
||||||
//
|
|
||||||
// // deploy custom model
|
// deploy custom model
|
||||||
// InputStream modelStream = getClass().getClassLoader().getResourceAsStream("tenant/exampleModel.xml");
|
InputStream modelStream = getClass().getClassLoader().getResourceAsStream("tenant/exampleModel.xml");
|
||||||
// repoAdminService.deployModel(modelStream, "exampleModel.xml");
|
repoAdminService.deployModel(modelStream, "exampleModel.xml");
|
||||||
//
|
|
||||||
// assertEquals(1, repoAdminService.getModels().size());
|
assertEquals(1, repoAdminService.getModels().size());
|
||||||
// assertEquals(defaultModelCnt+1, dictionaryService.getAllModels().size());
|
assertEquals(defaultModelCnt+1, dictionaryService.getAllModels().size());
|
||||||
//
|
|
||||||
// ClassDefinition myType = dictionaryService.getClass(QName.createQName("{my.new.model}sop"));
|
ClassDefinition myType = dictionaryService.getClass(QName.createQName("{my.new.model}sop"));
|
||||||
// assertNotNull(myType);
|
assertNotNull(myType);
|
||||||
// assertEquals(QName.createQName("{my.new.model}mynewmodel"),myType.getModel().getName());
|
assertEquals(QName.createQName("{my.new.model}mynewmodel"),myType.getModel().getName());
|
||||||
//
|
|
||||||
// // deactivate model
|
// deactivate model
|
||||||
// repoAdminService.deactivateModel("exampleModel.xml");
|
repoAdminService.deactivateModel("exampleModel.xml");
|
||||||
//
|
|
||||||
// assertEquals(1, repoAdminService.getModels().size()); // still deployed, although not active
|
assertEquals(1, repoAdminService.getModels().size()); // still deployed, although not active
|
||||||
// assertEquals(defaultModelCnt, dictionaryService.getAllModels().size());
|
assertEquals(defaultModelCnt, dictionaryService.getAllModels().size());
|
||||||
// assertNull(dictionaryService.getClass(QName.createQName("{my.new.model}sop")));
|
assertNull(dictionaryService.getClass(QName.createQName("{my.new.model}sop")));
|
||||||
//
|
|
||||||
// // re-activate model
|
// re-activate model
|
||||||
// repoAdminService.activateModel("exampleModel.xml");
|
repoAdminService.activateModel("exampleModel.xml");
|
||||||
//
|
|
||||||
// assertEquals(1, repoAdminService.getModels().size());
|
assertEquals(1, repoAdminService.getModels().size());
|
||||||
// assertEquals(defaultModelCnt+1, dictionaryService.getAllModels().size());
|
assertEquals(defaultModelCnt+1, dictionaryService.getAllModels().size());
|
||||||
//
|
|
||||||
// myType = dictionaryService.getClass(QName.createQName("{my.new.model}sop"));
|
myType = dictionaryService.getClass(QName.createQName("{my.new.model}sop"));
|
||||||
// assertNotNull(myType);
|
assertNotNull(myType);
|
||||||
// assertEquals(QName.createQName("{my.new.model}mynewmodel"),myType.getModel().getName());
|
assertEquals(QName.createQName("{my.new.model}mynewmodel"),myType.getModel().getName());
|
||||||
//
|
|
||||||
// return null;
|
return null;
|
||||||
// }
|
}
|
||||||
// }, tenantAdminName);
|
}, tenantAdminName);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAddCustomWebClient()
|
public void testAddCustomWebClient()
|
||||||
|
@@ -573,7 +573,7 @@ public class ActivitiWorkflowEngine extends BPMEngine implements WorkflowEngine
|
|||||||
// This should return all task definitions, including the start-task
|
// This should return all task definitions, including the start-task
|
||||||
ReadOnlyProcessDefinition processDefinition =((RepositoryServiceImpl)repoService).getDeployedProcessDefinition(processDefinitionId);
|
ReadOnlyProcessDefinition processDefinition =((RepositoryServiceImpl)repoService).getDeployedProcessDefinition(processDefinitionId);
|
||||||
|
|
||||||
String processName = processDefinition.getName();
|
String processName = ((ProcessDefinition)processDefinition).getKey();
|
||||||
factory.checkDomain(processName);
|
factory.checkDomain(processName);
|
||||||
|
|
||||||
// Process start task definition
|
// Process start task definition
|
||||||
|
Reference in New Issue
Block a user