-
Sub-task
-
Resolution: Done
-
Major
-
None
-
None
The test is resulting in a NPE on MacOS:
Error: testAsyncRespondBeforeRead(io.undertow.servlet.test.response.writer.ResponseWriterTestCase) Time elapsed: 113.969 s <<< ERROR! java.lang.NullPointerException at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:202) at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:176) at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:162) at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:153) at jakarta.servlet.ServletInputStream.readLine(ServletInputStream.java:81) at io.undertow.servlet.test.response.writer.AsyncResponseWriterOnPostServlet.lambda$doPost$0(AsyncResponseWriterOnPostServlet.java:48) at java.base/java.lang.Thread.run(Thread.java:829)
If the NPE is fixed, we get to see the following error:
java.io.IOException: UT010029: Stream is closed at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:168) at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:162) at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:153) at jakarta.servlet.ServletInputStream.readLine(ServletInputStream.java:81) at io.undertow.servlet.test.response.writer.AsyncResponseWriterOnPostServlet.lambda$doPost$0(AsyncResponseWriterOnPostServlet.java:48) at java.base/java.lang.Thread.run(Thread.java:829)
The test is taking a long time to run, not sure if something is timing out, or just a race condition that is causing the buffer to be closed before finishing reads.
The failure happens with both ResponseWriterTestCase.testAsyncRespondBeforeRead and ResponseWriterTestCase.testRespondBeforeRead