You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ivandika3 (via GitHub)" <gi...@apache.org> on 2025/05/03 03:29:24 UTC
Re: [PR] HDDS-12916. Support ETag in listObjects response [ozone]
ivandika3 commented on code in PR #8356:
URL: https://github.com/apache/ozone/pull/8356#discussion_r2072303468
##########
hadoop-ozone/integration-test-s3/src/test/java/org/apache/hadoop/ozone/s3/awssdk/v1/AbstractS3SDKV1Tests.java:
##########
@@ -593,19 +646,27 @@ public void testListObjectsManyV2() {
assertEquals(listObjectsResponse.getObjectSummaries().stream()
.map(S3ObjectSummary::getKey).collect(Collectors.toList()),
keyNames.subList(0, 2));
+ for (S3ObjectSummary objectSummary : listObjectsResponse.getObjectSummaries()) {
+ assertEquals(keyToEtag.get(objectSummary.getKey()), objectSummary.getETag());
+ }
assertTrue(listObjectsResponse.isTruncated());
+ // Include both keys with and without ETag
listObjectsRequest = new ListObjectsV2Request()
.withBucketName(bucketName)
- .withMaxKeys(2)
+ .withMaxKeys(5)
.withContinuationToken(listObjectsResponse.getNextContinuationToken());
listObjectsResponse = s3Client.listObjectsV2(listObjectsRequest);
- assertThat(listObjectsResponse.getObjectSummaries()).hasSize(1);
+ assertThat(listObjectsResponse.getObjectSummaries()).hasSize(3);
assertEquals(bucketName, listObjectsResponse.getBucketName());
- assertEquals(listObjectsResponse.getObjectSummaries().stream()
- .map(S3ObjectSummary::getKey).collect(Collectors.toList()),
- keyNames.subList(2, keyNames.size()));
+ assertEquals(bucketName, listObjectsResponse.getBucketName());
Review Comment:
Thanks for catching this. Updated.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org