use of com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails 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 com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails 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 com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails 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());
}
use of com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails in project irida by phac-nml.
the class GalaxyWorkflowStatusTest method testBuildWorkflowStatusFromHistoryDetailsUnknownState.
/**
* Tests failing to build a workflow status due to an unknwon state.
*/
@Test(expected = NullPointerException.class)
public void testBuildWorkflowStatusFromHistoryDetailsUnknownState() {
HistoryDetails historyDetails = new HistoryDetails();
historyDetails.setState("unknown");
historyDetails.setStateIds(Util.buildStateIdsWithStateFilled("ok", Lists.newArrayList(DATASET_ID)));
GalaxyWorkflowStatus.builder(historyDetails).build();
}
use of com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails in project irida by phac-nml.
the class GalaxyWorkflowStatusTest method testErrorOccured.
/**
* Tests whether or not this workflow is in an error state.
*/
@Test
public void testErrorOccured() {
HistoryDetails historyDetails = new HistoryDetails();
historyDetails.setState("error");
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());
}
Aggregations