use of org.apache.hadoop.yarn.server.resourcemanager.webapp.NodesPage.NodesBlock in project hadoop by apache.
the class TestNodesPage method testNodesBlockRenderForNodeLabelFilterWithEmptyLabel.
@Test
public void testNodesBlockRenderForNodeLabelFilterWithEmptyLabel() {
NodesBlock nodesBlock = injector.getInstance(NodesBlock.class);
nodesBlock.set("node.label", "");
nodesBlock.render();
PrintWriter writer = injector.getInstance(PrintWriter.class);
WebAppTests.flushOutput(injector);
Mockito.verify(writer, Mockito.times(numberOfThInMetricsTable)).print("<td");
}
use of org.apache.hadoop.yarn.server.resourcemanager.webapp.NodesPage.NodesBlock in project hadoop by apache.
the class TestNodesPage method testNodesBlockRenderForLostNodes.
@Test
public void testNodesBlockRenderForLostNodes() {
NodesBlock nodesBlock = injector.getInstance(NodesBlock.class);
nodesBlock.set("node.state", "lost");
nodesBlock.render();
PrintWriter writer = injector.getInstance(PrintWriter.class);
WebAppTests.flushOutput(injector);
Mockito.verify(writer, Mockito.times(numberOfActualTableHeaders + numberOfThInMetricsTable)).print("<th");
Mockito.verify(writer, Mockito.times(numberOfThInMetricsTable)).print("<td");
}
use of org.apache.hadoop.yarn.server.resourcemanager.webapp.NodesPage.NodesBlock in project hadoop by apache.
the class TestNodesPage method testNodesBlockRenderForNodeLabelFilterWithNonEmptyLabel.
@Test
public void testNodesBlockRenderForNodeLabelFilterWithNonEmptyLabel() {
NodesBlock nodesBlock = injector.getInstance(NodesBlock.class);
nodesBlock.set("node.label", "x");
nodesBlock.render();
PrintWriter writer = injector.getInstance(PrintWriter.class);
WebAppTests.flushOutput(injector);
Mockito.verify(writer, Mockito.times(numberOfThInMetricsTable)).print("<td");
Mockito.verify(writer, Mockito.times(1)).print("<script");
}
use of org.apache.hadoop.yarn.server.resourcemanager.webapp.NodesPage.NodesBlock in project hadoop by apache.
the class TestNodesPage method testNodesBlockRenderForNodeLabelFilterWithAnyLabel.
@Test
public void testNodesBlockRenderForNodeLabelFilterWithAnyLabel() {
NodesBlock nodesBlock = injector.getInstance(NodesBlock.class);
nodesBlock.set("node.label", "*");
nodesBlock.render();
PrintWriter writer = injector.getInstance(PrintWriter.class);
WebAppTests.flushOutput(injector);
Mockito.verify(writer, Mockito.times(numberOfThInMetricsTable)).print("<td");
}
Aggregations