use of org.apache.ignite.internal.managers.deployment.GridDeploymentStore in project ignite by apache.
the class ClassLoadingProblemExceptionTest method doTest.
/**
* @param spoilDeploymentBeforePrepare Test the check on preparing message.
* @param spoilMsgOnSnd Test the check on receiving message.
* @param eExp Exception expected.
* @throws Exception If failed.
*/
private void doTest(boolean spoilDeploymentBeforePrepare, boolean spoilMsgOnSnd, Class<? extends Throwable> eExp) throws Exception {
this.spoilDeploymentBeforePrepare = spoilDeploymentBeforePrepare;
this.spoilMsgOnSnd = spoilMsgOnSnd;
this.exceptionThrown.set(null);
IgniteEx crd = (IgniteEx) startGridsMultiThreaded(1);
crd.getOrCreateCache(CACHE_NAME);
IgniteEx client1 = startGrid(CLIENT_1);
IgniteEx client2 = startGrid(CLIENT_2);
awaitPartitionMapExchange();
GridDeploymentManager deploymentMgr = client2.context().deploy();
GridDeploymentStore store = GridTestUtils.getFieldValue(deploymentMgr, "locStore");
GridTestUtils.setFieldValue(deploymentMgr, "locStore", new GridDeploymentTestStore(store));
client1.compute(client1.cluster().forRemotes()).execute(new P2PDeploymentLongRunningTask(), null);
if (exceptionThrown.get() != null)
exceptionThrown.get().printStackTrace();
assertTrue("Wrong exception: " + exceptionThrown.get(), exceptionThrown.get() == null && eExp == null || X.hasCause(exceptionThrown.get(), eExp));
}
Aggregations