anoopj commented on code in PR #17965:
URL: https://github.com/apache/iceberg/pull/17965#discussion_r3959713161


##########
aliyun/src/test/java/org/apache/iceberg/aliyun/oss/TestOSSInputStream.java:
##########
@@ -92,6 +94,39 @@ private void readAndCheck(
         .isEqualTo(Arrays.copyOfRange(original, (int) rangeStart, (int) 
rangeEnd));
   }
 
+  @Test
+  public void testReadSingleEOF() throws Exception {

Review Comment:
   This test here doesn't exercise this fix. I think it might be passing even 
without the fix. This is because the single-byte path already returned `-1` 
correctly pre-fix (return stream.read()). The only bug there is pos/next 
desync. 
   
   Consider adding a  `getPos()` assertion:
   
   > assertThat(in.read()).isEqualTo(EOF);
   > assertThat(in.getPos()).isEqualTo(data.length); 
   
   This applies to the other  `testReadSingleEOF` as well. 



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