+1
Agree with the approach, Vishesh.

 


-----Original Message-----
From: Wei ZHOU <ustcweiz...@gmail.com> 
Sent: Tuesday, June 6, 2023 8:11 PM
To: dev@cloudstack.apache.org
Subject: Re: [DISCUSS] Upgrading Mockito & phasing out powermock

lgtm. go ahead Vishesh.

-Wei


On Tue, 6 Jun 2023 at 14:17, Vishesh Jindal <vishesh.jin...@shapeblue.com>
wrote:

> Hi all,
>
> I am working on upgrading Mockito's version & phasing out powermock. 
> For new maven modules, I would request all to use Mockito's mockStatic 
> instead of Powermock.
>
> Why?
> Powermock's last release was on Nov 2, 2020. The project seems to have 
> been abandoned. Powermock has compatibility issues with Mockito's 
> latest version as well.
>
> How?
> The only usage for PowerMock I could see in code was for mocking 
> static methods. Since Mockito v3.4.0, it has the capability to mock static 
> methods.
> I plan to migrate tests to Mockito's mockStatic instead of PowerMock. 
> This will have to be done module by module and will take some time.
>
> I have prepared a PR here: 
> https://github.com/apache/cloudstack/pull/7577
>
> This PR upgrades mockito from v3.2.4 to v3.12.4 and removes the usage 
> of PowerMock from utils module.
>
>
> Let me know if you have any questions/concerns.
>
> Regards,
> Vishesh
>
>
>
>
>

Reply via email to