Search in sources :

Example 21 with FlowStatusReport

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);
}
Also used : FlowStatusReport(org.apache.nifi.minifi.commons.status.FlowStatusReport) Test(org.junit.Test)

Example 22 with FlowStatusReport

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);
}
Also used : FlowStatusReport(org.apache.nifi.minifi.commons.status.FlowStatusReport) Test(org.junit.Test)

Example 23 with FlowStatusReport

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);
}
Also used : FlowStatusReport(org.apache.nifi.minifi.commons.status.FlowStatusReport) Test(org.junit.Test)

Example 24 with FlowStatusReport

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);
}
Also used : FlowStatusReport(org.apache.nifi.minifi.commons.status.FlowStatusReport) Test(org.junit.Test)

Example 25 with FlowStatusReport

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);
}
Also used : FlowStatusReport(org.apache.nifi.minifi.commons.status.FlowStatusReport) Test(org.junit.Test)

Aggregations

FlowStatusReport (org.apache.nifi.minifi.commons.status.FlowStatusReport)34 Test (org.junit.Test)29 LinkedList (java.util.LinkedList)2 Logger (org.slf4j.Logger)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 EOFException (java.io.EOFException)1 FileInputStream (java.io.FileInputStream)1 FileOutputStream (java.io.FileOutputStream)1 InputStream (java.io.InputStream)1 ObjectInputStream (java.io.ObjectInputStream)1 ObjectOutputStream (java.io.ObjectOutputStream)1 OutputStream (java.io.OutputStream)1 Field (java.lang.reflect.Field)1 Socket (java.net.Socket)1 SocketTimeoutException (java.net.SocketTimeoutException)1 Properties (java.util.Properties)1 TeeInputStream (org.apache.commons.io.input.TeeInputStream)1 ConnectionStatus (org.apache.nifi.controller.status.ConnectionStatus)1 ProcessGroupStatus (org.apache.nifi.controller.status.ProcessGroupStatus)1