Commit feb4cb85 authored by Peter Kruczkiewicz's avatar Peter Kruczkiewicz

fix IT; add catch for FileNotFoundException for downloadDatasetTo

parent 9c696088
Pipeline #7595 passed with stage
in 50 minutes and 56 seconds
......@@ -4,6 +4,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import java.nio.file.Path;
......@@ -327,7 +328,7 @@ public class GalaxyHistoriesService {
try {
final URL url = new URL(dataset.getFullDownloadUrl());
FileUtils.copyURLToFile(url, destination.toFile());
} catch (RuntimeException e) {
} catch (RuntimeException | FileNotFoundException e) {
throw new ExecutionManagerDownloadException(
"Could not download dataset identified by url=" + dataset.getFullDownloadUrl() + " to destination="
+ destination, e);
......
......@@ -475,7 +475,7 @@ public class GalaxyHistoriesServiceIT {
Util.waitUntilHistoryComplete(history.getId(), galaxyHistory, 60);
Path datasetPath = Files.createTempFile("data", "fastq");
dataset.setId(dataset.getId() + "oops");
dataset.setDownloadUrl(dataset.getDownloadUrl() + "oops");
galaxyHistory.downloadDatasetTo(dataset, datasetPath);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment