eolivelli commented on code in PR #1959:
URL: https://github.com/apache/zookeeper/pull/1959#discussion_r1073546869
##########
zookeeper-server/src/test/java/org/apache/zookeeper/common/ZKTrustManagerTest.java:
##########
@@ -148,9 +156,6 @@ public void
testServerHostnameVerificationWithHostnameVerificationDisabled() thr
X509Certificate[] certificateChain =
createSelfSignedCertifcateChain(IP_ADDRESS, HOSTNAME);
zkTrustManager.checkServerTrusted(certificateChain, null, mockSocket);
- verify(mockInetAddress, times(0)).getHostAddress();
Review Comment:
I knew that we are going to lose these assertions, the problem is that the
tests verified that these two methods were not called (or called N times).
We cannot spy the InetAddress object anymore.
we could create two "versions" of this test, if we are on JDK19+ we do it
this way, and if we are on older JDKs we keep the mock and run the test the
same way as before.
I don't think that there will be short term plans to abandon older JDKs soon
(years)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]