You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2023/01/17 21:29:50 UTC

[GitHub] [zookeeper] cnauroth commented on a diff in pull request #1959: [ZOOKEEPER-4647] Tests don't pass on JDK20 because we try to mock InetAddress

cnauroth commented on code in PR #1959:
URL: https://github.com/apache/zookeeper/pull/1959#discussion_r1072845647


##########
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:
   These `verify` calls are used to assert for expected behavior of hostname verification in various use cases. Without the `verify` calls, we would lose some test coverage, and I think several of these tests would all be testing the same thing.
   
   I'm not familiar with the new burningwave library. Do you know if there are any options it offers for intercepting these calls so that we could try to preserve this test coverage?



-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org