use of org.apache.nifi.minifi.commons.status.FlowStatusReport in project nifi-minifi by apache.
the class StatusConfigReporterTest method remoteProcessGroupStatusAll.
@Test
public void remoteProcessGroupStatusAll() throws Exception {
populateRemoteProcessGroup(true, true);
String statusRequest = "remoteProcessGroup:all:health, bulletins, inputPorts, outputPorts, stats";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
addExpectedRemoteProcessGroupStatus(expected, true, 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 processorStatusHealth.
@Test
public void processorStatusHealth() throws Exception {
populateProcessor(false, false);
String statusRequest = "processor:all:health";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
addProcessorStatus(expected, true, 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 remoteProcessGroupStatusStats.
@Test
public void remoteProcessGroupStatusStats() throws Exception {
populateRemoteProcessGroup(false, false);
String statusRequest = "remoteProcessGroup:all:stats";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
addExpectedRemoteProcessGroupStatus(expected, false, false, 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 systemDiagnosticHeap.
@Test
public void systemDiagnosticHeap() throws Exception {
populateSystemDiagnostics();
String statusRequest = "systemDiagnostics:heap";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
addSystemDiagnosticStatus(expected, true, 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 provenanceReportingTaskStatusHealth.
@Test
public void provenanceReportingTaskStatusHealth() throws Exception {
populateReportingTask(false, false);
String statusRequest = "provenanceReporting:health";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
addReportingTaskStatus(expected, true, false, false, false);
assertEquals(expected, actual);
}
Aggregations