Search in sources :

Example 26 with HistoryDetails

use of com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails in project irida by phac-nml.

the class GalaxyWorkflowStatusTest method testIsRunningWhileQueued.

/**
 * Tests whether or not this workflow is considered still running (while
 * queued).
 */
@Test
public void testIsRunningWhileQueued() {
    HistoryDetails historyDetails = new HistoryDetails();
    historyDetails.setState("queued");
    historyDetails.setStateIds(Util.buildStateIdsWithStateFilled("queued", Lists.newArrayList(DATASET_ID)));
    GalaxyWorkflowStatus workflowStatus = GalaxyWorkflowStatus.builder(historyDetails).build();
    assertTrue("Workflow is not still running", workflowStatus.isRunning());
}
Also used : HistoryDetails(com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails) GalaxyWorkflowStatus(ca.corefacility.bioinformatics.irida.model.workflow.execution.galaxy.GalaxyWorkflowStatus) Test(org.junit.Test)

Example 27 with HistoryDetails

use of com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails in project irida by phac-nml.

the class GalaxyWorkflowStatusTest method testErrorOccuredEmpty.

/**
 * Tests whether or not this workflow is in an error state when it is an
 * empty state.
 */
@Test
public void testErrorOccuredEmpty() {
    HistoryDetails historyDetails = new HistoryDetails();
    historyDetails.setState("empty");
    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());
}
Also used : HistoryDetails(com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails) GalaxyWorkflowStatus(ca.corefacility.bioinformatics.irida.model.workflow.execution.galaxy.GalaxyWorkflowStatus) Test(org.junit.Test)

Example 28 with HistoryDetails

use of com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails in project irida by phac-nml.

the class GalaxyWorkflowStatusTest method testErrorOccuredDiscardedStillRunning.

/**
 * Tests whether or not this workflow is in an error state when it is discarded
 * but the overall workflow is still running.
 */
@Test
public void testErrorOccuredDiscardedStillRunning() {
    HistoryDetails historyDetails = new HistoryDetails();
    historyDetails.setState("discarded");
    historyDetails.setStateIds(Util.buildStateIdsWithStateFilled("discarded", Lists.newArrayList(DATASET_ID)));
    GalaxyWorkflowStatus workflowStatus = GalaxyWorkflowStatus.builder(historyDetails).build();
    assertTrue("Workflow is not in an error state", workflowStatus.errorOccurred());
}
Also used : HistoryDetails(com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails) GalaxyWorkflowStatus(ca.corefacility.bioinformatics.irida.model.workflow.execution.galaxy.GalaxyWorkflowStatus) Test(org.junit.Test)

Aggregations

HistoryDetails (com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails)28 Test (org.junit.Test)25 GalaxyWorkflowStatus (ca.corefacility.bioinformatics.irida.model.workflow.execution.galaxy.GalaxyWorkflowStatus)18 List (java.util.List)5 Dataset (com.github.jmchilton.blend4j.galaxy.beans.Dataset)3 WorkflowOutputs (com.github.jmchilton.blend4j.galaxy.beans.WorkflowOutputs)3 History (com.github.jmchilton.blend4j.galaxy.beans.History)2 HistoryContentsProvenance (com.github.jmchilton.blend4j.galaxy.beans.HistoryContentsProvenance)2 Path (java.nio.file.Path)2 UploadException (ca.corefacility.bioinformatics.irida.exceptions.UploadException)1 WorkflowException (ca.corefacility.bioinformatics.irida.exceptions.WorkflowException)1 JobError (ca.corefacility.bioinformatics.irida.model.workflow.analysis.JobError)1 GalaxyWorkflowState (ca.corefacility.bioinformatics.irida.model.workflow.execution.galaxy.GalaxyWorkflowState)1 AnalysisSubmission (ca.corefacility.bioinformatics.irida.model.workflow.submission.AnalysisSubmission)1 HistoriesClient (com.github.jmchilton.blend4j.galaxy.HistoriesClient)1 JobsClient (com.github.jmchilton.blend4j.galaxy.JobsClient)1 ToolsClient (com.github.jmchilton.blend4j.galaxy.ToolsClient)1 HistoryDataset (com.github.jmchilton.blend4j.galaxy.beans.HistoryDataset)1 JobDetails (com.github.jmchilton.blend4j.galaxy.beans.JobDetails)1 Library (com.github.jmchilton.blend4j.galaxy.beans.Library)1