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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations