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


##########
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:
   good q. the changelog says they came in when I merged @adutra's changes and 
I haven't touched or questioned them since.
   
   It does implicitly verify that signing and the thirdparty S3 store under 
test is happy with those checksum options...they usually lag what AWS implement 
and then put in the SDK.
   
   Happy to cut it, unless Alex has strong opinions



-- 
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