You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Enrico Olivelli (Jira)" <ji...@apache.org> on 2023/02/15 07:40:00 UTC

[jira] [Updated] (ZOOKEEPER-4647) Tests don't pass on JDK20 because we try to mock InetAddress

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-4647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enrico Olivelli updated ZOOKEEPER-4647:
---------------------------------------
    Fix Version/s: 3.9.0
                   3.8.2

> 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
>            Assignee: Enrico Olivelli
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 3.9.0, 3.8.2
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> 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)