use of org.mule.runtime.deployment.model.internal.domain.DomainClassLoaderFactory in project mule by mulesoft.
the class DomainDeploymentTestCase method undeploysDomainCompletelyEvenOnDisposingException.
@Test
public void undeploysDomainCompletelyEvenOnDisposingException() throws Exception {
addPackedDomainFromBuilder(emptyDomainFileBuilder);
TestDomainFactory testDomainFactory = TestDomainFactory.createDomainFactory(new DomainClassLoaderFactory(containerClassLoader.getClassLoader()), containerClassLoader, serviceManager, moduleRepository, createDescriptorLoaderRepository());
testDomainFactory.setFailOnDisposeApplication();
deploymentService.setDomainFactory(testDomainFactory);
startDeployment();
assertDeploymentSuccess(domainDeploymentListener, emptyDomainFileBuilder.getId());
assertTrue("Unable to remove anchor file", removeDomainAnchorFile(emptyDomainFileBuilder.getId()));
assertUndeploymentSuccess(domainDeploymentListener, emptyDomainFileBuilder.getId());
assertAppFolderIsDeleted(emptyDomainFileBuilder.getId());
}
use of org.mule.runtime.deployment.model.internal.domain.DomainClassLoaderFactory in project mule by mulesoft.
the class DomainDeploymentTestCase method undeploysDomainCompletelyEvenOnStoppingException.
@Test
public void undeploysDomainCompletelyEvenOnStoppingException() throws Exception {
addPackedDomainFromBuilder(emptyDomainFileBuilder);
TestDomainFactory testDomainFactory = TestDomainFactory.createDomainFactory(new DomainClassLoaderFactory(containerClassLoader.getClassLoader()), containerClassLoader, serviceManager, moduleRepository, createDescriptorLoaderRepository());
testDomainFactory.setFailOnStopApplication();
deploymentService.setDomainFactory(testDomainFactory);
startDeployment();
assertDeploymentSuccess(domainDeploymentListener, emptyDomainFileBuilder.getId());
assertTrue("Unable to remove anchor file", removeDomainAnchorFile(emptyDomainFileBuilder.getId()));
assertUndeploymentSuccess(domainDeploymentListener, emptyDomainFileBuilder.getId());
assertAppFolderIsDeleted(emptyDomainFileBuilder.getId());
}
Aggregations