@Test public void testBuildDag() throws IllegalArgumentException, IOException, Exception { DAG dag = task.build(conf, work, path, appLr, null, new Context(conf)); for (BaseWork w : work.getAllWork()) { Vertex v = dag.getVertex(w.getName()); assertNotNull(v); List<Vertex> outs = v.getOutputVertices(); for (BaseWork x : work.getChildren(w)) { boolean found = false; for (Vertex u : outs) { if (u.getName().equals(x.getName())) { found = true; break; } } assertTrue(found); } } }
@Test public void testEmptyWork() throws IllegalArgumentException, IOException, Exception { DAG dag = task.build(conf, new TezWork(""), path, appLr, null, new Context(conf)); assertEquals(dag.getVertices().size(), 0); }