You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "XComp (via GitHub)" <gi...@apache.org> on 2023/08/17 12:42:49 UTC

[GitHub] [flink] XComp commented on a diff in pull request #23229: [FLINK-32888] Handle hasNext() throwing EndOfDataDecoderException

XComp commented on code in PR #23229:
URL: https://github.com/apache/flink/pull/23229#discussion_r1297168003


##########
flink-runtime/src/test/java/org/apache/flink/runtime/rest/MultipartUploadExtension.java:
##########
@@ -119,6 +120,12 @@ public void before(ExtensionContext context) throws Exception {
         }
         file2 = TempDirUtils.newFile(tmpDirectory);
         Files.write(file2.toPath(), "world".getBytes(ConfigConstants.DEFAULT_CHARSET));
+        file3 = TempDirUtils.newFile(tmpDirectory);
+        try (RandomAccessFile rw = new RandomAccessFile(file3, "rw")) {
+            // magic value that reliably reproduced EndOfDataDecoderException in hasNext()
+            rw.setLength(1410);

Review Comment:
   The test doesn't fail if I revert the fix. That makes me believe that this magic value doesn't reproduce the scenario reliably. How did you come up with the test scenario? :thinking: 



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

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