dmvk commented on code in PR #23229: URL: https://github.com/apache/flink/pull/23229#discussion_r1297666601
########## 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: If it's worth anything, the magic number break things for me 🪄 ``` [ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.23 s <<< FAILURE! - in org.apache.flink.runtime.rest.FileUploadHandlerITCase [ERROR] org.apache.flink.runtime.rest.FileUploadHandlerITCase.testMixedMultipartEndOfDataDecoderExceptionHandling(Path) Time elapsed: 0.099 s <<< FAILURE! org.opentest4j.AssertionFailedError: expected: 200 but was: 500 at java.base/jdk.i ``` ########## 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: If it's worth anything, the magic number break things for me 🪄 ``` [ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.23 s <<< FAILURE! - in org.apache.flink.runtime.rest.FileUploadHandlerITCase [ERROR] org.apache.flink.runtime.rest.FileUploadHandlerITCase.testMixedMultipartEndOfDataDecoderExceptionHandling(Path) Time elapsed: 0.099 s <<< FAILURE! org.opentest4j.AssertionFailedError: expected: 200 but was: 500 at java.base/jdk.i ``` -- 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