use of org.apache.ignite.spi.deployment.DeploymentSpi in project ignite by apache.
the class GridManagerStopSelfTest method testStopDeploymentManager.
/**
* @throws Exception If failed.
*/
public void testStopDeploymentManager() throws Exception {
DeploymentSpi spi = new LocalDeploymentSpi();
injectLogger(spi);
ctx.config().setDeploymentSpi(spi);
GridDeploymentManager mgr = new GridDeploymentManager(ctx);
mgr.stop(true);
}
use of org.apache.ignite.spi.deployment.DeploymentSpi in project ignite by apache.
the class GridDeploymentManagerStopSelfTest method testOnKernalStop.
/**
* @throws Exception If failed.
*/
public void testOnKernalStop() throws Exception {
DeploymentSpi spi = new GridTestDeploymentSpi();
GridTestKernalContext ctx = newContext();
ctx.config().setMarshaller(new JdkMarshaller());
ctx.config().setDeploymentSpi(spi);
GridResourceProcessor resProc = new GridResourceProcessor(ctx);
resProc.setSpringContext(null);
ctx.add(resProc);
GridComponent mgr = new GridDeploymentManager(ctx);
try {
mgr.onKernalStop(true);
} catch (Exception e) {
error("Error during onKernalStop() callback.", e);
assert false : "Unexpected exception " + e;
}
}
Aggregations