Search in sources :

Example 1 with DiagnosticsCollectionStatus

use of com.sequenceiq.common.api.diagnostics.DiagnosticsCollectionStatus in project cloudbreak by hortonworks.

the class FlowPayloadToDiagnosticDetailsConverterTest method testCalculateStatusServiceFinishedAndFailedNextEvent.

@Test
public void testCalculateStatusServiceFinishedAndFailedNextEvent() {
    // GIVEN
    // WHEN
    DiagnosticsCollectionStatus status = underTest.calculateStatus("finished", "finished", "failed", "failedEvent", "failedEvent", true, true);
    // THEN
    assertEquals(DiagnosticsCollectionStatus.FAILED, status);
}
Also used : DiagnosticsCollectionStatus(com.sequenceiq.common.api.diagnostics.DiagnosticsCollectionStatus) Test(org.junit.jupiter.api.Test)

Example 2 with DiagnosticsCollectionStatus

use of com.sequenceiq.common.api.diagnostics.DiagnosticsCollectionStatus in project cloudbreak by hortonworks.

the class FlowPayloadToDiagnosticDetailsConverterTest method testCalculateStatusServiceStatusFailed.

@Test
public void testCalculateStatusServiceStatusFailed() {
    // GIVEN
    // WHEN
    DiagnosticsCollectionStatus status = underTest.calculateStatus("currentState", "finished", "failed", "failedEvent", "nextEvent", false, true);
    // THEN
    assertEquals(DiagnosticsCollectionStatus.FAILED, status);
}
Also used : DiagnosticsCollectionStatus(com.sequenceiq.common.api.diagnostics.DiagnosticsCollectionStatus) Test(org.junit.jupiter.api.Test)

Example 3 with DiagnosticsCollectionStatus

use of com.sequenceiq.common.api.diagnostics.DiagnosticsCollectionStatus in project cloudbreak by hortonworks.

the class FlowPayloadToDiagnosticDetailsConverterTest method testCalculateStatusServiceStatus.

@Test
public void testCalculateStatusServiceStatus() {
    // GIVEN
    // WHEN
    DiagnosticsCollectionStatus status = underTest.calculateStatus("currentState", "finished", "failed", "failedEvent", "nextEvent", false, false);
    // THEN
    assertEquals(DiagnosticsCollectionStatus.IN_PROGRESS, status);
}
Also used : DiagnosticsCollectionStatus(com.sequenceiq.common.api.diagnostics.DiagnosticsCollectionStatus) Test(org.junit.jupiter.api.Test)

Example 4 with DiagnosticsCollectionStatus

use of com.sequenceiq.common.api.diagnostics.DiagnosticsCollectionStatus in project cloudbreak by hortonworks.

the class FlowPayloadToDiagnosticDetailsConverterTest method testCalculateStatusServiceFinished.

@Test
public void testCalculateStatusServiceFinished() {
    // GIVEN
    // WHEN
    DiagnosticsCollectionStatus status = underTest.calculateStatus("finished", "finished", "failed", "failedEvent", "nextEvent", true, false);
    // THEN
    assertEquals(DiagnosticsCollectionStatus.FINISHED, status);
}
Also used : DiagnosticsCollectionStatus(com.sequenceiq.common.api.diagnostics.DiagnosticsCollectionStatus) Test(org.junit.jupiter.api.Test)

Example 5 with DiagnosticsCollectionStatus

use of com.sequenceiq.common.api.diagnostics.DiagnosticsCollectionStatus in project cloudbreak by hortonworks.

the class FlowPayloadToDiagnosticDetailsConverterTest method testCalculateStatusServiceFinishedAndFailed.

@Test
public void testCalculateStatusServiceFinishedAndFailed() {
    // GIVEN
    // WHEN
    DiagnosticsCollectionStatus status = underTest.calculateStatus("finished", "finished", "failed", "failedEvent", "nextEvent", true, true);
    // THEN
    assertEquals(DiagnosticsCollectionStatus.FAILED, status);
}
Also used : DiagnosticsCollectionStatus(com.sequenceiq.common.api.diagnostics.DiagnosticsCollectionStatus) Test(org.junit.jupiter.api.Test)

Aggregations

DiagnosticsCollectionStatus (com.sequenceiq.common.api.diagnostics.DiagnosticsCollectionStatus)5 Test (org.junit.jupiter.api.Test)5