use of com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails in project irida by phac-nml.
the class GalaxyWorkflowStatusTest method testBuildWorkflowStatusFromHistoryDetailsUnknownStateIdsFail.
/**
* Tests failing to build a GalaxyWorkflowStats object with some state
* ids in an unknown state.
*/
@Test(expected = NullPointerException.class)
public void testBuildWorkflowStatusFromHistoryDetailsUnknownStateIdsFail() {
Map<String, List<String>> stateIds = Util.buildStateIdsWithStateFilled("running", Lists.newArrayList(DATASET_ID));
stateIds.put("unknown", Lists.newArrayList(DATASET_ID));
HistoryDetails historyDetails = new HistoryDetails();
historyDetails.setState("running");
historyDetails.setStateIds(stateIds);
GalaxyWorkflowStatus.builder(historyDetails).build();
}
use of com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails 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 com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails 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 com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails in project irida by phac-nml.
the class GalaxyWorkflowStatusTest method testBuildWorkflowStatusFromHistoryDetailsErrorNoDetailsState.
/**
* Tests building a GalaxyWorkflowStatus object with no history details
* state and failing.
*/
@Test(expected = NullPointerException.class)
public void testBuildWorkflowStatusFromHistoryDetailsErrorNoDetailsState() {
HistoryDetails historyDetails = new HistoryDetails();
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 testBuildWorkflowStatusFromHistoryDetailsErrorNoDetailsIdsMap.
/**
* Tests building a GalaxyWorkflowStatus object with no history details
* state ids map and failing.
*/
@Test(expected = NullPointerException.class)
public void testBuildWorkflowStatusFromHistoryDetailsErrorNoDetailsIdsMap() {
HistoryDetails historyDetails = new HistoryDetails();
historyDetails.setState("ok");
historyDetails.setStateIds(null);
GalaxyWorkflowStatus.builder(historyDetails).build();
}
Aggregations