programId.getProgram()); if (exception == null) { response.add(new BatchProgramHistory(batchProgram, HttpResponseStatus.OK.code(), null, programHistory.getRuns())); } else if (exception instanceof NotFoundException) { response.add(new BatchProgramHistory(batchProgram, HttpResponseStatus.NOT_FOUND.code(), exception.getMessage(), Collections.emptyList())); } else if (exception instanceof UnauthorizedException) { response.add(new BatchProgramHistory(batchProgram, HttpResponseStatus.FORBIDDEN.code(), exception.getMessage(), Collections.emptyList())); } else { response.add(new BatchProgramHistory(batchProgram, HttpResponseStatus.INTERNAL_SERVER_ERROR.code(), exception.getMessage(), Collections.emptyList()));
Assert.assertEquals(sleepWorkflow2.getId(), sleepRun.getProgramId()); Assert.assertEquals(dummyMR2.getId(), dummyMR2Run.getProgramId()); Assert.assertEquals(serviceId2.getProgram(), service2Run.getProgramId()); Assert.assertEquals(200, sleepRun.getStatusCode()); Assert.assertEquals(200, dummyMR2Run.getStatusCode()); Assert.assertEquals(404, service2Run.getStatusCode()); Assert.assertEquals(runRecord.getPid(), sleepRun.getRuns().iterator().next().getPid()); Assert.assertEquals(runRecord.getPid(), dummyMR2Run.getRuns().iterator().next().getPid()); Assert.assertTrue(service2Run.getRuns().isEmpty());
programId.getProgram()); if (exception == null) { response.add(new BatchProgramHistory(batchProgram, HttpResponseStatus.OK.code(), null, programHistory.getRuns())); } else if (exception instanceof NotFoundException) { response.add(new BatchProgramHistory(batchProgram, HttpResponseStatus.NOT_FOUND.code(), exception.getMessage(), Collections.emptyList())); } else if (exception instanceof UnauthorizedException) { response.add(new BatchProgramHistory(batchProgram, HttpResponseStatus.FORBIDDEN.code(), exception.getMessage(), Collections.emptyList())); } else { response.add(new BatchProgramHistory(batchProgram, HttpResponseStatus.INTERNAL_SERVER_ERROR.code(), exception.getMessage(), Collections.emptyList()));