Enrico Olivelli created ZOOKEEPER-4647:
------------------------------------------

             Summary: Tests don't pass on JDK20 because we try to mock 
InetAddress
                 Key: ZOOKEEPER-4647
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4647
             Project: ZooKeeper
          Issue Type: Test
            Reporter: Enrico Olivelli


This test fails on JDK20-Ea



org.apache.zookeeper.test.StaticHostProviderTest.testEmptyResolution



Mockito cannot mock this class: class java.net.InetAddress. Mockito can only 
mock non-private & non-final classes. If you're not sure why you're getting 
this error, please report to the mailing list.

if I try to upgrade  Mockito to 4.9.0  the error is

org.mockito.exceptions.base.MockitoException: 

Cannot mock/spy class java.net.InetAddress

Mockito cannot mock/spy because :

 - sealed class

 

 at 
org.apache.zookeeper.test.StaticHostProviderTest.testReResolvingSingle(StaticHostProviderTest.jav



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to