diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-06-14 20:18:44 +0200 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2021-06-14 20:18:44 +0200 |
commit | 335c9cbe5ef2c593b201420583ca528df9dda77a (patch) | |
tree | 6a419e1896f9f420d662f6a442f5690d763964ca /filedistribution/src/test | |
parent | 85d3f65e2cdf0e7c9abc89ac64042ee1101d7e40 (diff) |
Move some methods from FileReferenceDownloader to FileDownloader
Diffstat (limited to 'filedistribution/src/test')
-rw-r--r-- | filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java | 8 |
1 files changed, 4 insertions, 4 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 1d11b358540..d7700467494 100644 --- a/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java +++ b/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java @@ -175,7 +175,7 @@ public class FileDownloaderTest { // Getting file failed, verify download status and since there was an error is not downloading ATM assertDownloadStatus(fileReference, 0.0); - assertFalse(fileDownloader.fileReferenceDownloader().isDownloading(fileReference)); + assertFalse(fileDownloader.isDownloading(fileReference)); // Receives fileReference, should return and make it available to caller String filename = "abc.jar"; @@ -209,8 +209,8 @@ public class FileDownloaderTest { Future<Future<Optional<File>>> future1 = executor.submit(() -> fileDownloader.getFutureFile(fileReferenceDownload)); do { Thread.sleep(10); - } while (! fileDownloader.fileReferenceDownloader().isDownloading(fileReference)); - assertTrue(fileDownloader.fileReferenceDownloader().isDownloading(fileReference)); + } while (! fileDownloader.isDownloading(fileReference)); + assertTrue(fileDownloader.isDownloading(fileReference)); // Request file while download is in progress Future<Future<Optional<File>>> future2 = executor.submit(() -> fileDownloader.getFutureFile(fileReferenceDownload)); @@ -240,7 +240,7 @@ public class FileDownloaderTest { FileReference foo = new FileReference("foo"); // Should download since we do not have the file on disk fileDownloader.downloadIfNeeded(new FileReferenceDownload(foo)); - assertTrue(fileDownloader.fileReferenceDownloader().isDownloading(foo)); + assertTrue(fileDownloader.isDownloading(foo)); assertFalse(fileDownloader.getFile(foo).isPresent()); // Receive files to simulate download receiveFile(); |