danielcweeks commented on code in PR #15428:
URL: https://github.com/apache/iceberg/pull/15428#discussion_r3076005864


##########
aws/src/integration/java/org/apache/iceberg/aws/s3/signer/TestS3RestSigner.java:
##########
@@ -255,22 +266,39 @@ public void after() {
   }
 
   @Test
-  public void validatedUploadPart() {
+  public void validatedUploadMultiPart() {
+    final String key = "some/multipart-key";
     String multipartUploadId =
         s3.createMultipartUpload(
-                CreateMultipartUploadRequest.builder()
-                    .bucket(BUCKET)
-                    .key("some/multipart-key")
-                    .build())
+                
CreateMultipartUploadRequest.builder().bucket(BUCKET).key(key).build())
             .uploadId();
-    s3.uploadPart(
-        UploadPartRequest.builder()
+    final UploadPartResponse response =
+        s3.uploadPart(
+            UploadPartRequest.builder()
+                .bucket(BUCKET)
+                .key(key)
+                .uploadId(multipartUploadId)
+                .partNumber(1)
+                .build(),
+            RequestBody.fromString("content"));
+    s3.completeMultipartUpload(
+        CompleteMultipartUploadRequest.builder()
             .bucket(BUCKET)
-            .key("some/multipart-key")
+            .key(key)
             .uploadId(multipartUploadId)
-            .partNumber(1)
-            .build(),
-        RequestBody.fromString("content"));
+            .multipartUpload(
+                CompletedMultipartUpload.builder()
+                    .parts(
+                        CompletedPart.builder()
+                            .partNumber(1)
+                            .eTag(response.eTag())
+                            .checksumCRC32(response.checksumCRC32())
+                            .checksumCRC32C(response.checksumCRC32C())
+                            .checksumSHA1(response.checksumSHA1())
+                            .checksumSHA256(response.checksumSHA256())
+                            .build())
+                    .build())
+            .build());
   }

Review Comment:
   I'm not sure I understand these updates.  It looks like we're doing a little 
cleanup and adding additional builder actions (etag, hecksums), but I'm not 
seeing them tested or used anywhere. 
   
   Why do we need these changes?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to