use of ca.corefacility.bioinformatics.irida.model.workflow.execution.galaxy.GalaxyWorkflowStatus in project irida by phac-nml.
the class GalaxyWorkflowStatusTest method testErrorOccuredFailedMetadata.
/**
* Tests whether or not this workflow is in an error state when there is
* failed metadata.
*/
@Test
public void testErrorOccuredFailedMetadata() {
HistoryDetails historyDetails = new HistoryDetails();
historyDetails.setState("failed_metadata");
historyDetails.setStateIds(Util.buildStateIdsWithStateFilled("failed_metadata", Lists.newArrayList(DATASET_ID)));
GalaxyWorkflowStatus workflowStatus = GalaxyWorkflowStatus.builder(historyDetails).build();
assertTrue("Workflow is not in an error state", workflowStatus.errorOccurred());
}
use of ca.corefacility.bioinformatics.irida.model.workflow.execution.galaxy.GalaxyWorkflowStatus in project irida by phac-nml.
the class GalaxyWorkflowStatusTest method testErrorOccuredEmptyStillRunning.
/**
* Tests whether or not this workflow is in an error state when it is empty
* but the overall workflow is still running.
*/
@Test
public void testErrorOccuredEmptyStillRunning() {
HistoryDetails historyDetails = new HistoryDetails();
historyDetails.setState("running");
historyDetails.setStateIds(Util.buildStateIdsWithStateFilled("empty", Lists.newArrayList(DATASET_ID)));
GalaxyWorkflowStatus workflowStatus = GalaxyWorkflowStatus.builder(historyDetails).build();
assertTrue("Workflow is not in an error state", workflowStatus.errorOccurred());
}
use of ca.corefacility.bioinformatics.irida.model.workflow.execution.galaxy.GalaxyWorkflowStatus in project irida by phac-nml.
the class GalaxyWorkflowStatusTest method testErrorOccuredFailedMetadataStillRunning.
/**
* Tests whether or not this workflow is in an error state when there is
* failed metadata but the overall workflow is still running.
*/
@Test
public void testErrorOccuredFailedMetadataStillRunning() {
HistoryDetails historyDetails = new HistoryDetails();
historyDetails.setState("running");
historyDetails.setStateIds(Util.buildStateIdsWithStateFilled("failed_metadata", Lists.newArrayList(DATASET_ID)));
GalaxyWorkflowStatus workflowStatus = GalaxyWorkflowStatus.builder(historyDetails).build();
assertTrue("Workflow is not in an error state", workflowStatus.errorOccurred());
}
use of ca.corefacility.bioinformatics.irida.model.workflow.execution.galaxy.GalaxyWorkflowStatus in project irida by phac-nml.
the class GalaxyWorkflowStatusTest method testErrorOccuredWhileStillRunning.
/**
* Tests whether or not an error occured even while still running.
*/
@Test
public void testErrorOccuredWhileStillRunning() {
HistoryDetails historyDetails = new HistoryDetails();
historyDetails.setState("running");
historyDetails.setStateIds(Util.buildStateIdsWithStateFilled("error", Lists.newArrayList(DATASET_ID)));
GalaxyWorkflowStatus workflowStatus = GalaxyWorkflowStatus.builder(historyDetails).build();
assertTrue("Workflow is not in an error state", workflowStatus.errorOccurred());
}
use of ca.corefacility.bioinformatics.irida.model.workflow.execution.galaxy.GalaxyWorkflowStatus in project irida by phac-nml.
the class GalaxyWorkflowStatusTest method testCompletedSuccessfully.
/**
* Tests whether or not this workflow completed successfully.
*/
@Test
public void testCompletedSuccessfully() {
HistoryDetails historyDetails = new HistoryDetails();
historyDetails.setState("ok");
historyDetails.setStateIds(Util.buildStateIdsWithStateFilled("ok", Lists.newArrayList(DATASET_ID)));
GalaxyWorkflowStatus workflowStatus = GalaxyWorkflowStatus.builder(historyDetails).build();
assertTrue("Workflow did not complete successfully", workflowStatus.completedSuccessfully());
}
Aggregations