Shenjiaqi commented on code in PR #20860:
URL: https://github.com/apache/flink/pull/20860#discussion_r990613601


##########
flink-runtime/src/test/java/org/apache/flink/runtime/state/memory/ByteStreamStateHandleTest.java:
##########
@@ -172,4 +172,15 @@ public void testBulkReadINdexOutOfBounds() throws 
IOException {
             // expected
         }
     }
+
+    @Test
+    public void testStreamWithEmptyByteArray() throws IOException {
+        final byte[] data = new byte[0];
+        final ByteStreamStateHandle handle = new ByteStreamStateHandle("name", 
data);
+
+        FSDataInputStream in = handle.openInputStream();
+        in.seek(0);

Review Comment:
   this can be removed.



##########
flink-runtime/src/test/java/org/apache/flink/runtime/state/memory/ByteStreamStateHandleTest.java:
##########
@@ -172,4 +172,15 @@ public void testBulkReadINdexOutOfBounds() throws 
IOException {
             // expected
         }
     }
+
+    @Test
+    public void testStreamWithEmptyByteArray() throws IOException {
+        final byte[] data = new byte[0];
+        final ByteStreamStateHandle handle = new ByteStreamStateHandle("name", 
data);
+
+        FSDataInputStream in = handle.openInputStream();
+        in.seek(0);

Review Comment:
   > Why we need to seek to the 1st position?
   
   I will remove it.



-- 
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-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to