Search in sources :

Example 26 with FlowStatusReport

use of org.apache.nifi.minifi.commons.status.FlowStatusReport in project nifi-minifi by apache.

the class StatusConfigReporterTest method remoteProcessGroupStatusInputPorts.

@Test
public void remoteProcessGroupStatusInputPorts() throws Exception {
    populateRemoteProcessGroup(false, false);
    String statusRequest = "remoteProcessGroup:all:inputPorts";
    FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
    FlowStatusReport expected = new FlowStatusReport();
    expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
    addExpectedRemoteProcessGroupStatus(expected, false, true, false, false, false, false);
    assertEquals(expected, actual);
}
Also used : FlowStatusReport(org.apache.nifi.minifi.commons.status.FlowStatusReport) Test(org.junit.Test)

Example 27 with FlowStatusReport

use of org.apache.nifi.minifi.commons.status.FlowStatusReport in project nifi-minifi by apache.

the class StatusConfigReporterTest method remoteProcessGroupStatusBulletins.

@Test
public void remoteProcessGroupStatusBulletins() throws Exception {
    populateRemoteProcessGroup(true, false);
    String statusRequest = "remoteProcessGroup:all:bulletins";
    FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
    FlowStatusReport expected = new FlowStatusReport();
    expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
    addExpectedRemoteProcessGroupStatus(expected, false, false, false, false, true, true);
    assertEquals(expected, actual);
}
Also used : FlowStatusReport(org.apache.nifi.minifi.commons.status.FlowStatusReport) Test(org.junit.Test)

Example 28 with FlowStatusReport

use of org.apache.nifi.minifi.commons.status.FlowStatusReport in project nifi-minifi by apache.

the class StatusConfigReporterTest method connectionStatusHealth.

@Test
public void connectionStatusHealth() throws Exception {
    populateConnection();
    String statusRequest = "connection:all:health";
    FlowStatusReport status = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
    FlowStatusReport expected = new FlowStatusReport();
    expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
    addConnectionStatus(expected, true, false);
    assertEquals(expected, status);
}
Also used : FlowStatusReport(org.apache.nifi.minifi.commons.status.FlowStatusReport) Test(org.junit.Test)

Example 29 with FlowStatusReport

use of org.apache.nifi.minifi.commons.status.FlowStatusReport in project nifi-minifi by apache.

the class StatusConfigReporterTest method systemDiagnosticProcessorStats.

@Test
public void systemDiagnosticProcessorStats() throws Exception {
    populateSystemDiagnostics();
    String statusRequest = "systemDiagnostics:processorStats";
    FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
    FlowStatusReport expected = new FlowStatusReport();
    expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
    addSystemDiagnosticStatus(expected, false, true, false, false, false);
    assertEquals(expected, actual);
}
Also used : FlowStatusReport(org.apache.nifi.minifi.commons.status.FlowStatusReport) Test(org.junit.Test)

Example 30 with FlowStatusReport

use of org.apache.nifi.minifi.commons.status.FlowStatusReport in project nifi-minifi by apache.

the class StatusConfigReporterTest method systemDiagnosticFlowFileRepo.

@Test
public void systemDiagnosticFlowFileRepo() throws Exception {
    populateSystemDiagnostics();
    String statusRequest = "systemDiagnostics:flowfilerepositoryusage";
    FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(StatusConfigReporterTest.class));
    FlowStatusReport expected = new FlowStatusReport();
    expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
    addSystemDiagnosticStatus(expected, false, false, true, 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