-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make junit only test and add module info #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch, thanks so much!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... actually, there's one small snag here. I'm able to build and test with Java 12+ but when using Java 11, tests fail with an error:
java.io.IOException: Received fatal alert: handshake_failure
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:565)
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:119)
at io.github.c0urante.joplin@0.2.0-SNAPSHOT/io.github.c0urante.joplin.HueEntertainmentClient.startEntertainment(HueEntertainmentClient.java:337)
at io.github.c0urante.joplin@0.2.0-SNAPSHOT/io.github.c0urante.joplin.HueEntertainmentClient.initializeStream(HueEntertainmentClient.java:186)
at io.github.c0urante.joplin@0.2.0-SNAPSHOT/io.github.c0urante.joplin.HueEntertainmentClientTest.testWhite(HueEntertainmentClientTest.java:62)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:336)
at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:293)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:185)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:171)
at java.base/sun.security.ssl.SSLEngineImpl.decode(SSLEngineImpl.java:681)
at java.base/sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:636)
at java.base/sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:454)
at java.base/sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:433)
at java.base/javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:637)
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader.unwrapBuffer(SSLFlowDelegate.java:481)
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader.processData(SSLFlowDelegate.java:392)
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader$ReaderDownstreamPusher.run(SSLFlowDelegate.java:264)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SynchronizedRestartableTask.run(SequentialScheduler.java:175)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:147)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:198)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Adding <useModulePath>false</useModulePath>
to the configuration for the maven-surefire-plugin
fixes this, but I'm not certain this is wise since I haven't verified yet whether the root cause is a bug with the project, a problem with my Java setup, just a quirk of the testing environment, or something else.
I've found https://bugs.openjdk.org/browse/JDK-8221674 which seems promising, but even after verifying that the jdk.crypto.ec.jmod
file was present in the $JAVA_HOME/jmods
directory for my Java 11 compiler, the issue persists.
@bowbahdoe if you have any insight on this, please let me know. Otherwise, I'll try to do some more digging later to see if this is worth worrying about. In the meantime, I'd be happy to merge the changes to the POM now and tackle adding a module-info.java
file in a separate PR if you'd prefer.
Thanks again for your contribution, by the way!
Okay, I've verified a few things:
Given this, I'm inclined to merge and address test issues with Java 11 as a follow-up item. |
No description provided.