use of io.elastest.etm.model.TJobExecution.ResultEnum in project elastest-torm by elastest.
the class TJobExecOrchestratorService method saveFinishStatus.
public void saveFinishStatus(TJobExecution tJobExec, DockerExecution dockerExec) {
String resultMsg = "";
ResultEnum finishStatus = ResultEnum.SUCCESS;
if (tJobExec.getTestSuites() != null) {
for (TestSuite testSuite : tJobExec.getTestSuites()) {
if (testSuite.getFinalStatus() == ResultEnum.FAIL) {
// Else
// always
// success
finishStatus = testSuite.getFinalStatus();
break;
}
}
} else {
if (dockerExec.getTestContainerExitCode() != 0) {
finishStatus = ResultEnum.FAIL;
}
}
resultMsg = "Finished: " + finishStatus;
updateTJobExecResultStatus(tJobExec, finishStatus, resultMsg);
}
Aggregations