use of org.apache.nifi.minifi.commons.status.FlowStatusReport in project nifi-minifi by apache.
the class StatusConfigReporterTest method processorStatusAll.
@Test
public void processorStatusAll() throws Exception {
populateProcessor(true, true);
String statusRequest = "processor:all:health, stats, bulletins";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
addProcessorStatus(expected, true, true, true, true, true);
assertEquals(expected, actual);
}
use of org.apache.nifi.minifi.commons.status.FlowStatusReport in project nifi-minifi by apache.
the class StatusConfigReporterTest method controllerServiceStatusHealth.
@Test
public void controllerServiceStatusHealth() throws Exception {
populateControllerService(false, false);
String statusRequest = "controllerServices:health";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
addControllerServiceStatus(expected, true, false, false, false);
assertEquals(expected, actual);
}
use of org.apache.nifi.minifi.commons.status.FlowStatusReport in project nifi-minifi by apache.
the class StatusConfigReporterTest method remoteProcessGroupStatusHealth.
@Test
public void remoteProcessGroupStatusHealth() throws Exception {
populateRemoteProcessGroup(false, false);
String statusRequest = "remoteProcessGroup:all:health";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
addExpectedRemoteProcessGroupStatus(expected, true, false, false, false, false, false);
assertEquals(expected, actual);
}
use of org.apache.nifi.minifi.commons.status.FlowStatusReport in project nifi-minifi by apache.
the class StatusConfigReporterTest method instanceStatusStats.
@Test
public void instanceStatusStats() throws Exception {
populateInstance(false);
String statusRequest = "instance:stats";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
addInstanceStatus(expected, false, true, false, false);
assertEquals(expected, actual);
}
use of org.apache.nifi.minifi.commons.status.FlowStatusReport in project nifi-minifi by apache.
the class StatusConfigReporterTest method instanceStatusAll.
@Test
public void instanceStatusAll() throws Exception {
populateInstance(true);
String statusRequest = "instance:stats, bulletins, health";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
addInstanceStatus(expected, true, true, true, true);
assertEquals(expected, actual);
}
Aggregations