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
[ZOOKEEPER-4647] Tests don't pass on JDK20 because we try to mock InetAddress #1959
[ZOOKEEPER-4647] Tests don't pass on JDK20 because we try to mock InetAddress #1959
Conversation
1f8170c
to
a43cd32
Compare
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.
@eolivelli , thank you for the patch. It looks good overall. I entered one question about potential impact to total test coverage.
zookeeper-server/src/test/java/org/apache/zookeeper/common/ZKTrustManagerTest.java
Show resolved
Hide resolved
zookeeper-server/src/test/java/org/apache/zookeeper/common/ZKTrustManagerTest.java
Show resolved
Hide resolved
zookeeper-server/src/test/java/org/apache/zookeeper/common/ZKTrustManagerTest.java
Show resolved
Hide resolved
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.
@cnauroth any other comments ? |
…tAddress - upgrade Mockito to 4.9.0 and use BurningWave DNS mock tools
bf1422b
to
98fa34b
Compare
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.
@eolivelli , sorry I went silent on this one. Belated +1, and thank you for incorporating the code review feedback!
@cnauroth no worries. You are welcome. |
Some tests do not pass on latest JDK20 (and also in JDK19) because we are trying to mock InetAddress.
More context here
https://issues.apache.org/jira/browse/ZOOKEEPER-4647
Unfortunately upgrading Mockito doesn't help and so I had to add Burning Wave DNS tools on the classpath.
https://dev.to/jjbrt/how-to-configure-hostname-resolution-to-use-a-universal-custom-hostname-resolver-in-java-14p0
The tests that mock InetAddress now pass on JDK19 and JDK20 on my laptop