[ 
https://issues.apache.org/jira/browse/CASSANDRA-18152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17676727#comment-17676727
 ] 

Ekaterina Dimitrova edited comment on CASSANDRA-18152 at 1/13/23 6:37 PM:
--------------------------------------------------------------------------

Thank you for the ping and the testing, appreciate it! The branch you took is 
already a bit old and WIP but I think it should serve your needs. I can confirm 
that I updated some time ago mockito-core to latest version in trunk and that 
version officially supports Java 17.

I haven't used mockito-inline and when I write in Google mockito-inline Java 17 
support, it took me to this [page 
|https://github.com/mockito/mockito/issues/2436]  that discusses an issue 
people reported in 2021 and the maintainers confirming they are testing in CI 
mockito-inline so _my guess_ is that it should be fine, but I didn't spend too 
much time in researching. It is important not just to test but also to verify 
that the maintainers of our dependencies are supporting or planning soon to 
support newer JDK versions. Hope that helps.


was (Author: e.dimitrova):
Thank you for the ping and the testing, appreciate it! The branch you took is 
already a bit old and WIP but I think it should serve your needs. I can confirm 
that I updated some time ago mockito-core to latest version in trunk and that 
version officially supports Java 17.

I haven't used mockito-inline and when I write in Google mockito-inline Java 17 
support, it took me to this page that discusses an issue people reported in 
2021 and the maintainers confirming they are testing in CI mockito-inline so 
_my guess_ is that it should be fine, but I didn't spend too much time in 
researching. It is important not just to test but also to verify that the 
maintainers of our dependencies are supporting or planning soon to support 
newer JDK versions. Hope that helps.

> mockito-inline causes tests to fail beacause 
> o.a.c.distributed.mock.nodetool.InternalNodeProbe spies on StorageServiceMBean
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-18152
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18152
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/dtest/java
>            Reporter: Stefan Miklosovic
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 4.x
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> While working on CASSANDRA-14361, when we included mockito-inline into the 
> build to test the new functionality, unrelated tests in CI started to fail. 
> (1)
> This is happening because mockito, together with stuff which enables static 
> mocking, just does not play together with our way of doing things in dtest 
> framework.
> The workaround is consisting of removing Mockito from InternalNodeProbe, it 
> tries to spy on StorageService to not send any notifications back. This might 
> be workarounded so we do not need Mockito hence tests are fixed and mocking 
> of static methods is possible without any other tests failing.
> (1) 
> https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/2168/#showFailuresLink
> see also: [https://github.com/mockito/mockito/issues/2203]



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to