use of org.apache.tez.dag.app.dag.event.VertexEventTermination in project tez by apache.
the class TestVertexImpl method testTerminatingVertexForVComplete.
@Test(timeout = 5000)
public void testTerminatingVertexForVComplete() throws Exception {
setupPreDagCreation();
dagPlan = createSamplerDAGPlan(false);
setupPostDagCreation();
VertexImpl vertex = spy(vertices.get("A"));
initVertex(vertex);
startVertex(vertex);
vertex.handle(new VertexEventTermination(vertex.getVertexId(), VertexTerminationCause.INTERNAL_ERROR));
vertex.handle(new VertexEvent(vertex.getVertexId(), VertexEventType.V_COMPLETED));
dispatcher.await();
Assert.assertTrue(vertex.inTerminalState());
for (String diagnostic : vertex.getDiagnostics()) {
if (diagnostic.contains("Invalid event")) {
fail("Unexpected Invalid event transition!");
}
}
}
Aggregations