adutra commented on code in PR #15428:
URL: https://github.com/apache/iceberg/pull/15428#discussion_r3088391344
##########
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:
@steveloughran I don't recall adding this myself tbh – I vaguely recall you
told me you were in contact with a few AWS engineers, and they suggested adding
the extra stuff to have examples that match the reality. I don't mind removing
them though.
--
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]