chenjian2664 commented on code in PR #18765:
URL: https://github.com/apache/iceberg/pull/18765#discussion_r4799516291


##########
aws/src/integration/java/org/apache/iceberg/aws/s3/TestS3FileIO.java:
##########
@@ -291,6 +291,22 @@ public void testPrefixList() {
     
assertThat(Streams.stream(s3FileIO.listPrefix(prefix)).count()).isEqualTo(totalFiles);
   }
 
+  @Test
+  public void prefixListWithAccessPointReturnsBucketLocations() throws 
IOException {
+    String accessPoint = "access-point";
+    createBucket(accessPoint);
+    S3FileIO accessPointFileIO = new S3FileIO(() -> s3mock);
+    accessPointFileIO.initialize(
+        ImmutableMap.of(S3FileIOProperties.ACCESS_POINTS_PREFIX + "bucket", 
accessPoint));
+
+    String location = "s3://bucket/path/to/list-access-point/file.txt";
+    accessPointFileIO.newOutputFile(location).create().close();
+
+    
assertThat(accessPointFileIO.listPrefix("s3://bucket/path/to/list-access-point/"))
+        .extracting(FileInfo::location)
+        .containsExactly(location);
+  }

Review Comment:
   No, I only ran it against the S3-compatible test container, where the access 
point is simulated by a second bucket. I added the same case to 
`TestS3FileIOIntegration`, which lists through a real S3 access point, but I 
haven't run that suite against an AWS account yet.



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