@@ -257,9 +257,12 @@ public void testPartialRetriesWithInjectedFailures() throws NoSuchMethodExceptio
257257 try {
258258 final List <Ds3Object > filesToGet = new ArrayList <>();
259259
260- filesToGet .add (new PartialDs3Object ("lesmis-copies.txt" , Range .byLength (0 , 100 )));
260+ final String DIR_NAME = "largeFiles/" ;
261+ final String FILE_NAME = "lesmis-copies.txt" ;
262+
263+ filesToGet .add (new PartialDs3Object (FILE_NAME , Range .byLength (0 , 100 )));
261264
262- filesToGet .add (new PartialDs3Object ("lesmis-copies.txt" , Range .byLength (100 , 100 )));
265+ filesToGet .add (new PartialDs3Object (FILE_NAME , Range .byLength (100 , 100 )));
263266
264267 final Ds3ClientShim ds3ClientShim = new Ds3ClientShim ((Ds3ClientImpl ) client );
265268
@@ -273,16 +276,13 @@ public void testPartialRetriesWithInjectedFailures() throws NoSuchMethodExceptio
273276
274277 job .transfer (new FileObjectGetter (tempDirectory ));
275278
276- final String DIR_NAME = "largeFiles/" ;
277- final String FILE_NAME = "lesmis-copies.txt" ;
278-
279279 try (final InputStream originalFileStream = Thread .currentThread ().getContextClassLoader ().getResourceAsStream (DIR_NAME + FILE_NAME )) {
280280 final byte [] first200Bytes = new byte [200 ];
281281 int numBytesRead = originalFileStream .read (first200Bytes , 0 , 200 );
282282
283283 assertThat (numBytesRead , is (200 ));
284284
285- try (final InputStream fileReadFromBP = Files .newInputStream (Paths .get (tempDirectory .toString (), "lesmis-copies.txt" ))) {
285+ try (final InputStream fileReadFromBP = Files .newInputStream (Paths .get (tempDirectory .toString (), FILE_NAME ))) {
286286 final byte [] first200BytesFromBP = new byte [200 ];
287287
288288 numBytesRead = fileReadFromBP .read (first200BytesFromBP , 0 , 200 );
0 commit comments