Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
3.0.0-M6
-
None
-
None
Description
Using the SUREFIRE-1614 minimal project as a starting point I've added the line
System.out.println();
at line 16 of CustomRunner.class
I've also updated the dependancies, but it mostly remains the same.
I've attached the reproducible example
Executing with `./mvnw -Pjunit5 test` or `./mvnw -Pjunit4 test` both produce the same output.
Downgrading to 3.0.0-M5 no longer causes the issue.
This will now trigger the exception
java.nio.BufferOverflowException at java.base/java.nio.Buffer.nextPutIndex(Buffer.java:722) at java.base/java.nio.HeapByteBuffer.put(HeapByteBuffer.java:209) at org.apache.maven.surefire.api.stream.AbstractStreamEncoder.encodeString(AbstractStreamEncoder.java:127) at org.apache.maven.surefire.api.stream.AbstractStreamEncoder.encodeStringData(AbstractStreamEncoder.java:171) at org.apache.maven.surefire.api.stream.AbstractStreamEncoder.encode(AbstractStreamEncoder.java:157) at org.apache.maven.surefire.booter.spi.EventChannelEncoder.encodeMessage(EventChannelEncoder.java:398) at org.apache.maven.surefire.booter.spi.EventChannelEncoder.setOutErr(EventChannelEncoder.java:188) at org.apache.maven.surefire.booter.spi.EventChannelEncoder.testOutput(EventChannelEncoder.java:183) at org.apache.maven.surefire.api.booter.ForkingRunListener.writeTestOutput(ForkingRunListener.java:113) at org.apache.maven.surefire.api.booter.ForkingRunListener.writeTestOutput(ForkingRunListener.java:44) at org.apache.maven.surefire.junitplatform.RunListenerAdapter.writeTestOutput(RunListenerAdapter.java:379) at org.apache.maven.surefire.api.report.ConsoleOutputCapture$ForwardingPrintStream.println(ConsoleOutputCapture.java:144) at com.example.demo.CustomRunner.createTestClass(CustomRunner.java:16)
Attachments
Attachments
Issue Links
- is related to
-
SUREFIRE-2056 BufferOverflowException when encoding message with null testId
- Closed
- relates to
-
SUREFIRE-2076 BufferOverflowException when encoding message with null runMode
- Closed