zymap commented on code in PR #15063:
URL: https://github.com/apache/pulsar/pull/15063#discussion_r861428242


##########
tiered-storage/jcloud/src/test/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlockAwareSegmentInputStreamTest.java:
##########
@@ -256,13 +280,35 @@ public void testHaveEndPadding() throws Exception {
         int left = blockSize - DataBlockHeaderImpl.getDataStartOffset() -  
expectedEntryCount * (entrySize + 4 + 8);
         assertEquals(left, 5);
         byte padding[] = new byte[left];
-        inputStream.read(padding);
+        if (useBufferRead) {
+            int ret = 0;
+            int offset = 0;
+            while ((ret = inputStream.read(padding, offset, padding.length - 
offset)) > 0) {

Review Comment:
   Updated tests. I asserted the returned value by another read. 
https://github.com/apache/pulsar/pull/15063/commits/fcb7fd4fc2bcc602edbabc844dff6e72c936d5b2#diff-1f2edfe47e5f4f0d8b1634a21eeaccf78eb36d05c55d1c02f20f146247926defR293



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

Reply via email to