Search in sources :

Example 1 with DomainClassLoaderFactory

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());
}
Also used : DomainClassLoaderFactory(org.mule.runtime.deployment.model.internal.domain.DomainClassLoaderFactory) Test(org.junit.Test)

Example 2 with DomainClassLoaderFactory

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());
}
Also used : DomainClassLoaderFactory(org.mule.runtime.deployment.model.internal.domain.DomainClassLoaderFactory) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 DomainClassLoaderFactory (org.mule.runtime.deployment.model.internal.domain.DomainClassLoaderFactory)2