use of org.apache.ignite.internal.processors.service.inner.LongInitializedTestService in project ignite by apache.
the class ServiceDeploymentProcessingOnNodesLeftTest method testDeploymentProcessingOnServersLeaveTopology.
/**
* @throws Exception In case of an error.
*/
@Test
public void testDeploymentProcessingOnServersLeaveTopology() throws Exception {
try {
startGrids(4);
IgniteEx client = startClientGrid(getConfiguration("client"));
IgniteEx ignite1 = grid(1);
IgniteEx ignite2 = grid(2);
((BlockingTcpCommunicationSpi) ignite1.configuration().getCommunicationSpi()).block();
((BlockingTcpCommunicationSpi) ignite2.configuration().getCommunicationSpi()).block();
IgniteFuture fut = client.services().deployNodeSingletonAsync("testService", new LongInitializedTestService(5000L));
IgniteFuture fut2 = client.services().deployNodeSingletonAsync("testService2", new LongInitializedTestService(5000L));
stopNode(ignite1);
stopNode(ignite2);
fut.get(TEST_FUTURE_WAIT_TIMEOUT);
fut2.get(TEST_FUTURE_WAIT_TIMEOUT);
IgniteEx ignite3 = grid(3);
assertNotNull(ignite3.services().service("testService"));
assertNotNull(ignite3.services().service("testService2"));
} finally {
stopAllGrids();
}
}
Aggregations