From 7bcae27672e6138c4cbd2160795481c0a7c850fd Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Mon, 21 Jun 2021 07:46:02 +0200 Subject: Use unique file reference in test --- .../com/yahoo/vespa/filedistribution/FileDownloaderTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'filedistribution/src') 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 d7700467494..3ac3dc638f9 100644 --- a/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java +++ b/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java @@ -103,7 +103,7 @@ public class FileDownloaderTest { { // fileReference does not exist on disk, needs to be downloaded) - FileReference fileReference = new FileReference("fileReference"); + FileReference fileReference = new FileReference("baz"); File fileReferenceFullPath = fileReferenceFullPath(downloadDir, fileReference); assertFalse(fileReferenceFullPath.getAbsolutePath(), fileDownloader.getFile(fileReference).isPresent()); @@ -202,7 +202,7 @@ public class FileDownloaderTest { // Delay response so that we can make a second request while downloading the file from the first request connection.setResponseHandler(new MockConnection.WaitResponseHandler(Duration.ofSeconds(1))); - FileReference fileReference = new FileReference("fileReference"); + FileReference fileReference = new FileReference("fileReference123"); File fileReferenceFullPath = fileReferenceFullPath(downloadDir, fileReference); FileReferenceDownload fileReferenceDownload = new FileReferenceDownload(fileReference); @@ -252,10 +252,10 @@ public class FileDownloaderTest { @Test public void receiveFile() throws IOException { - FileReference foo = new FileReference("foo"); + FileReference foobar = new FileReference("foobar"); String filename = "foo.jar"; - receiveFile(fileDownloader, foo, filename, FileReferenceData.Type.file, "content"); - File downloadedFile = new File(fileReferenceFullPath(downloadDir, foo), filename); + receiveFile(fileDownloader, foobar, filename, FileReferenceData.Type.file, "content"); + File downloadedFile = new File(fileReferenceFullPath(downloadDir, foobar), filename); assertEquals("content", IOUtils.readFile(downloadedFile)); } -- cgit v1.2.3