use of ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyLibrariesService in project irida by phac-nml.
the class GalaxyLibrariesServiceIT method testFilesToLibraryWaitFailTimeout.
/**
* Tests failure to upload to a library due to a timeout issue.
*
* @throws UploadException
* @throws GalaxyDatasetException
*/
@Test(expected = UploadTimeoutException.class)
public void testFilesToLibraryWaitFailTimeout() throws UploadException, GalaxyDatasetException {
galaxyLibrariesService = new GalaxyLibrariesService(librariesClient, 1, 2, 1);
Library library = buildEmptyLibrary("testFilesToLibraryWaitFailTimeout");
galaxyLibrariesService.filesToLibraryWait(Sets.newHashSet(dataFile, dataFile2), FILE_TYPE, library, DataStorage.LOCAL);
}
use of ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyLibrariesService in project irida by phac-nml.
the class AnalysisWorkspaceServiceGalaxyIT method setup.
/**
* Sets up variables for testing.
*
* @throws URISyntaxException
* @throws IOException
* @throws IridaWorkflowLoadException
*/
@Before
public void setup() throws URISyntaxException, IOException, IridaWorkflowLoadException {
Assume.assumeFalse(WindowsPlatformCondition.isWindows());
Path sequenceFilePathReal = Paths.get(DatabaseSetupGalaxyITService.class.getResource("testData1.fastq").toURI());
Path referenceFilePathReal = Paths.get(DatabaseSetupGalaxyITService.class.getResource("testReference.fasta").toURI());
Path tempDir = Files.createTempDirectory(rootTempDirectory, "workspaceServiceGalaxyTest");
sequenceFilePathA = tempDir.resolve("testDataA_R1_001.fastq");
Files.copy(sequenceFilePathReal, sequenceFilePathA, StandardCopyOption.REPLACE_EXISTING);
sequenceFilePath2A = tempDir.resolve("testDataA_R2_001.fastq");
Files.copy(sequenceFilePathReal, sequenceFilePath2A, StandardCopyOption.REPLACE_EXISTING);
sequenceFilePathB = tempDir.resolve("testDataB_R1_001.fastq");
Files.copy(sequenceFilePathReal, sequenceFilePathB, StandardCopyOption.REPLACE_EXISTING);
sequenceFilePath2B = tempDir.resolve("testDataB_R2_001.fastq");
Files.copy(sequenceFilePathReal, sequenceFilePath2B, StandardCopyOption.REPLACE_EXISTING);
sequenceFilePath3 = tempDir.resolve("testData3_R1_001.fastq");
Files.copy(sequenceFilePathReal, sequenceFilePath3, StandardCopyOption.REPLACE_EXISTING);
referenceFilePath = Files.createTempFile("testReference", ".fasta");
Files.delete(referenceFilePath);
Files.copy(referenceFilePathReal, referenceFilePath);
singleFileSet = Sets.newHashSet(new SingleEndSequenceFile(new SequenceFile(sequenceFilePathA)));
GalaxyInstance galaxyInstanceAdmin = localGalaxy.getGalaxyInstanceAdmin();
HistoriesClient historiesClient = galaxyInstanceAdmin.getHistoriesClient();
ToolsClient toolsClient = galaxyInstanceAdmin.getToolsClient();
LibrariesClient librariesClient = galaxyInstanceAdmin.getLibrariesClient();
GalaxyLibrariesService galaxyLibrariesService = new GalaxyLibrariesService(librariesClient, LIBRARY_POLLING_TIME, LIBRARY_TIMEOUT, 1);
galaxyHistoriesService = new GalaxyHistoriesService(historiesClient, toolsClient, galaxyLibrariesService);
pairSequenceFiles1A = new ArrayList<>();
pairSequenceFiles1A.add(sequenceFilePathA);
pairSequenceFiles2A = new ArrayList<>();
pairSequenceFiles2A.add(sequenceFilePath2A);
pairSequenceFiles1AB = new ArrayList<>();
pairSequenceFiles1AB.add(sequenceFilePathA);
pairSequenceFiles1AB.add(sequenceFilePathB);
pairSequenceFiles2AB = new ArrayList<>();
pairSequenceFiles2AB.add(sequenceFilePath2A);
pairSequenceFiles2AB.add(sequenceFilePath2B);
}
Aggregations