use of com.hazelcast.jet.core.TestProcessors.StuckProcessor in project hazelcast-jet by hazelcast.
the class TopologyChangeTest method when_nonCoordinatorLeavesDuringExecution_then_clientStillGetsJobResult.
@Test
public void when_nonCoordinatorLeavesDuringExecution_then_clientStillGetsJobResult() throws Throwable {
// Given
JetInstance client = createJetClient();
DAG dag = new DAG().vertex(new Vertex("test", new MockPS(StuckProcessor::new, nodeCount)));
// When
Job job = client.newJob(dag);
StuckProcessor.executionStarted.await();
instances[2].getHazelcastInstance().getLifecycleService().terminate();
StuckProcessor.proceedLatch.countDown();
job.join();
}
use of com.hazelcast.jet.core.TestProcessors.StuckProcessor in project hazelcast-jet by hazelcast.
the class TopologyChangeTest method when_coordinatorLeavesDuringExecution_then_nonCoordinatorJobSubmitterStillGetsJobResult.
@Test
public void when_coordinatorLeavesDuringExecution_then_nonCoordinatorJobSubmitterStillGetsJobResult() throws Throwable {
// Given
DAG dag = new DAG().vertex(new Vertex("test", new MockPS(StuckProcessor::new, nodeCount)));
// When
Job job = instances[1].newJob(dag);
StuckProcessor.executionStarted.await();
instances[0].getHazelcastInstance().getLifecycleService().terminate();
StuckProcessor.proceedLatch.countDown();
// Then
job.join();
}
Aggregations