Closed AlexanderSchuetz97 closed 1 year ago
This is actually a bug in the JDK ;-). There is an assert in the JDK code that the bytes-to-read is not 0, which is wrong, because the contract explicitly states that you can request 0 bytes. Also, I cannot "fix" (work-around) it, because the code that calls the offending method is also in the JDK. So the solution is to use a newer JDK. Or disable assertions ;-)
Ok good to know, i was just a bit worried. I have just skipped the test for the java 11 build since it passes with java 17.
Hello, when building flupke a test fails.
Git commit id: 7795a34080c9de24093dbef72c285635a70cb6df
OS: Windows 11 JVM in JAVA_HOME env variable: JAVA_VERSION=11.0.14.1, JAVA_VENDOR=Eclipse Adoptium, RUNTIME_NAME=OpenJDK Runtime Environment, RUNTIME_VERSION=11.0.14.1+1, VM_NAME=OpenJDK 64-Bit Server VM, VM_VERSION=11.0.14.1+1
Commands from windows Powershell: git clone https://github.com/ptrd/flupke.git git submodule update --init --recursive ./gradlew build -iS
Note: it fails without "-iS" but that just gives more insight into what actually fails. This test fails 100% of the time. I tested 3 times.
Note: Error does not occur when using java 17!
Output:
net.luminis.http3.impl.Http3ClientConnectionImplTest > receivingResponseWithInputStreamAndMultipleDataFramesShouldWork FAILED java.lang.AssertionError at java.net.http/jdk.internal.net.http.ResponseSubscribers$HttpResponseInputStream.read(ResponseSubscribers.java:408) at java.base/java.io.InputStream.readNBytes(InputStream.java:396) at java.base/java.io.InputStream.readAllBytes(InputStream.java:333) at net.luminis.http3.impl.Http3ClientConnectionImplTest.receivingResponseWithInputStreamAndMultipleDataFramesShouldWork(Http3ClientConnectionImplTest.java:225)
net.luminis.http3.server.file.FileServerTest > handleSimpleFileRequest STANDARD_OUT 10.0.0.58 - - [4/Sep./2023:14:56:47 +0200] GET file HTTP/3 0 0
net.luminis.http3.server.file.FileServerTest > testFileNotFoundRequest STANDARD_OUT 10.0.0.58 - - [4/Sep./2023:14:56:47 +0200] GET doesnotexist HTTP/3 0 0
Gradle Test Executor 1 finished executing tests.
81 tests completed, 1 failed