charliec05 commented on code in PR #17870:
URL: https://github.com/apache/iceberg/pull/17870#discussion_r3901219534


##########
dell/src/test/java/org/apache/iceberg/dell/ecs/TestEcsInputFile.java:
##########
@@ -58,4 +59,15 @@ public void testFileRead() throws IOException {
           .isEqualTo("0123456789");
     }
   }
+
+  @Test
+  public void knownLengthAvoidsMetadataRequest() {
+    String location = new EcsURI(rule.bucket(), 
rule.randomObjectName()).toString();
+    EcsFileIO fileIO = new EcsFileIO();
+    fileIO.initialize(rule.clientProperties());
+
+    InputFile inputFile = fileIO.newInputFile(location, 10L);
+
+    assertThat(inputFile.getLength()).as("File length should use the known 
value").isEqualTo(10L);

Review Comment:
   Good point. I updated the test to use a mock `S3Client` and 
`verifyNoInteractions(client)`, so it now explicitly asserts that reading the 
known length makes no metadata request. The full `:iceberg-dell:test` suite 
passes.



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