@@ -250,7 +250,7 @@ void testExecuteMultipart(boolean doCopy) throws IOException {
250250 if (doCopy ) {
251251 when (client .uploadPartCopy (uploadPartCopyRequestCaptor .capture ())).thenAnswer (invocationOnMock -> {
252252 final UploadPartCopyRequest request = invocationOnMock .getArgument (0 );
253- return UploadPartCopyResponse .builder ().copyPartResult (b -> b .eTag (expectedEtags .get (request .partNumber ()))).build ();
253+ return UploadPartCopyResponse .builder ().copyPartResult (b -> b .eTag (expectedEtags .get (request .partNumber () - 1 ))).build ();
254254 });
255255 } else {
256256 when (client .uploadPart (uploadPartRequestCaptor .capture (), uploadPartBodyCaptor .capture ())).thenAnswer (invocationOnMock -> {
@@ -353,7 +353,6 @@ void testExecuteMultipart(boolean doCopy) throws IOException {
353353 public void testExecuteMultipartUploadAborted () {
354354 final String bucketName = randomAlphaOfLengthBetween (1 , 10 );
355355 final String blobName = randomAlphaOfLengthBetween (1 , 10 );
356- final BlobPath blobPath = BlobPath .EMPTY ;
357356
358357 final long blobSize = ByteSizeUnit .MB .toBytes (765 );
359358 final long bufferSize = ByteSizeUnit .MB .toBytes (150 );
@@ -423,7 +422,7 @@ public void close() {}
423422 blobContainer .executeMultipartUpload (randomPurpose (), blobStore , blobName , new ByteArrayInputStream (new byte [0 ]), blobSize );
424423 });
425424
426- assertEquals ("Unable to upload or copy object [" + blobName + "] using multipart upload" , e .getMessage ());
425+ assertEquals ("Unable to upload object [" + blobName + "] using multipart upload" , e .getMessage ());
427426 assertThat (e .getCause (), instanceOf (S3Exception .class ));
428427 assertEquals (exceptions .get (stage ).getMessage (), e .getCause ().getMessage ());
429428
0 commit comments