use of org.apache.hadoop.mapreduce.v2.app.MockAppContext in project hadoop by apache.
the class TestHSWebApp method testAppControllerIndex.
@Test
public void testAppControllerIndex() {
MockAppContext ctx = new MockAppContext(0, 1, 1, 1);
Injector injector = WebAppTests.createMockInjector(AppContext.class, ctx);
HsController controller = injector.getInstance(HsController.class);
controller.index();
assertEquals(ctx.getApplicationID().toString(), controller.get(APP_ID, ""));
}
use of org.apache.hadoop.mapreduce.v2.app.MockAppContext in project hadoop by apache.
the class TestHSWebApp method testSingleCounterView.
@Test
public void testSingleCounterView() {
LOG.info("HsSingleCounterPage");
WebAppTests.testPage(HsSingleCounterPage.class, AppContext.class, new MockAppContext(0, 1, 1, 1));
}
use of org.apache.hadoop.mapreduce.v2.app.MockAppContext in project hadoop by apache.
the class TestHSWebApp method testJobView.
@Test
public void testJobView() {
LOG.info("HsJobPage");
AppContext appContext = new MockAppContext(0, 1, 1, 1);
Map<String, String> params = TestAMWebApp.getJobParams(appContext);
WebAppTests.testPage(HsJobPage.class, AppContext.class, appContext, params);
}
use of org.apache.hadoop.mapreduce.v2.app.MockAppContext in project hadoop by apache.
the class TestHSWebApp method testTaskViewNaturalSortType.
@Test
public void testTaskViewNaturalSortType() {
LOG.info("HsTaskPage");
AppContext appContext = new MockAppContext(0, 1, 1, 1);
Map<String, String> params = TestAMWebApp.getTaskParams(appContext);
Injector testPage = WebAppTests.testPage(HsTaskPage.class, AppContext.class, appContext, params);
View viewInstance = testPage.getInstance(HsTaskPage.class);
Map<String, String> moreParams = viewInstance.context().requestContext().moreParams();
String appTableColumnsMeta = moreParams.get("ui.dataTables.attempts.init");
Assert.assertTrue(appTableColumnsMeta.indexOf("natural") != -1);
}
use of org.apache.hadoop.mapreduce.v2.app.MockAppContext in project hadoop by apache.
the class TestHSWebApp method testConfView.
@Test
public void testConfView() {
LOG.info("HsConfPage");
WebAppTests.testPage(HsConfPage.class, AppContext.class, new MockAppContext(0, 1, 1, 1));
}
Aggregations