Download file with resume
authorszlenkj <jakub.szlenk@contractors.roche.com>
Fri, 26 Jan 2024 07:30:33 +0000 (08:30 +0100)
committerszlenkj <jakub.szlenk@contractors.roche.com>
Thu, 8 Feb 2024 19:21:37 +0000 (20:21 +0100)
Arvados-DCO-1.1-Signed-off-by: Jakub Szlenk jakubszlenk@gmail.com

sdk/java-v2/src/test/java/org/arvados/client/logic/keep/FileDownloaderTest.java

index 2f2f81294cf163dfef85b2b5afbe8954bf6e1a5e..0ca27f8fe6c8bc5ce186f615949e9c4856007aed 100644 (file)
@@ -32,7 +32,6 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.file.Files;
-import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -123,7 +122,6 @@ public class FileDownloaderTest {
         //given
         String collectionUuid = "some-collection-uuid";
         String fileName = "sample-file-name";
-        String pathToDownloadFolder = "downloads";
         long start = 1024;
         Long end = null;
 
@@ -133,7 +131,7 @@ public class FileDownloaderTest {
         when(keepWebApiClient.get(collectionUuid, fileName, start, end)).thenReturn(inputStream);
 
         //when
-        File downloadedFile = fileDownloader.downloadFileWithResume(collectionUuid, fileName, pathToDownloadFolder, start, end);
+        File downloadedFile = fileDownloader.downloadFileWithResume(collectionUuid, fileName, FILE_DOWNLOAD_TEST_DIR, start, end);
 
         //then
         Assert.assertNotNull(downloadedFile);
@@ -144,7 +142,6 @@ public class FileDownloaderTest {
         assertArrayEquals(expectedData, actualData);
 
         Files.delete(downloadedFile.toPath());
-        Files.delete(Paths.get(pathToDownloadFolder));
     }
 
     @After