diff options
author | Harald Musum <musum@oath.com> | 2018-03-05 22:14:04 +0100 |
---|---|---|
committer | Harald Musum <musum@oath.com> | 2018-03-05 22:14:04 +0100 |
commit | 50476bc875dba422ab0937881ff514966ff3bb6e (patch) | |
tree | 6208957ec6f721ceaf19f37978911ab27f957517 /filedistribution/src/test | |
parent | 637f92465afe8866849d61fd1ed768e44b82c731 (diff) |
Make sure to remove from download queue if download fails, else
we will never try to download again, even if there is an external request
for the file reference again
Diffstat (limited to 'filedistribution/src/test')
-rw-r--r-- | filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java b/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java index c8d9e0a3eda..960a18aaa4c 100644 --- a/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java +++ b/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java @@ -161,14 +161,14 @@ public class FileDownloaderTest { File fileReferenceFullPath = fileReferenceFullPath(downloadDir, fileReference); assertFalse(fileReferenceFullPath.getAbsolutePath(), fileDownloader.getFile(fileReference).isPresent()); - // Verify download status + // Getting file failed, verify download status and since there was an error is not downloading ATM assertDownloadStatus(fileDownloader, fileReference, 0.0); + assertFalse(fileDownloader.fileReferenceDownloader().isDownloading(fileReference)); // Receives fileReference, should return and make it available to caller String filename = "abc.jar"; receiveFile(fileReference, filename, FileReferenceData.Type.file, "some other content"); Optional<File> downloadedFile = fileDownloader.getFile(fileReference); - assertTrue(downloadedFile.isPresent()); File downloadedFileFullPath = new File(fileReferenceFullPath, filename); assertEquals(downloadedFileFullPath.getAbsolutePath(), downloadedFile.get().getAbsolutePath()); |