mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
CM-690 virtualization is disabled by default - virtualization integration tests and the integration tests suite run with vf enabled
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@117531 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -57,13 +57,17 @@ import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.transaction.TransactionService;
|
||||
import org.alfresco.traitextender.SpringExtensionBundle;
|
||||
import org.alfresco.util.ApplicationContextHelper;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Ignore;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
@Ignore
|
||||
public abstract class VirtualizationIntegrationTest extends TestCase implements VirtualizationTest
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(VirtualizationIntegrationTest.class);
|
||||
|
||||
private static final String PROP_VM_TEMPLATE_CLASSPATH = "prop_vm_system-template-location";
|
||||
|
||||
@@ -157,12 +161,25 @@ public abstract class VirtualizationIntegrationTest extends TestCase implements
|
||||
protected String configuredTemplatesClassPath = null;
|
||||
|
||||
protected SystemTemplateLocationsConstraint constraints;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception
|
||||
{
|
||||
virtualizationConfigTestBootstrap = ctx.getBean(VIRTUALIZATION_CONFIG_TEST_BOOTSTRAP_BEAN_ID,
|
||||
VirtualizationConfigTestBootstrap.class);
|
||||
|
||||
if (!virtualizationConfigTestBootstrap.areVirtualFoldersEnabled())
|
||||
{
|
||||
// "use the force" and enable virtual folders
|
||||
SpringExtensionBundle vfBundle = ctx.getBean("virtualFoldersBundle",
|
||||
SpringExtensionBundle.class);
|
||||
vfBundle.start();
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.info("Virtual folders are spring-enabled.");
|
||||
}
|
||||
|
||||
// Get the required services
|
||||
ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean("ServiceRegistry");
|
||||
transactionService = serviceRegistry.getTransactionService();
|
||||
@@ -206,6 +223,14 @@ public abstract class VirtualizationIntegrationTest extends TestCase implements
|
||||
|
||||
public void tearDown() throws Exception
|
||||
{
|
||||
if (!virtualizationConfigTestBootstrap.areVirtualFoldersEnabled())
|
||||
{
|
||||
// "use the force" and disable virtual folders
|
||||
SpringExtensionBundle vfBundle = ctx.getBean("virtualFoldersBundle",
|
||||
SpringExtensionBundle.class);
|
||||
vfBundle.stop();
|
||||
}
|
||||
|
||||
if (configuredTemplatesClassPath != null)
|
||||
{
|
||||
constraints.setTemplatesParentClasspath(configuredTemplatesClassPath);
|
||||
|
Reference in New Issue
Block a user