Turns out I should have refreshed the ticket comments before submitting my PR, because Michael Oleske beat me to it yesterday: https://github.com/apache/geode/pull/6107
Sorry for the email spam! ________________________________ From: Donal Evans <doev...@vmware.com> Sent: Wednesday, March 10, 2021 11:55 AM To: dev@geode.apache.org <dev@geode.apache.org> Subject: Re: Avoid PowerMockito I've just submitted a PR to remove three uses of PowerMock.when that can be trivially replaced with Mockito.when: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fgeode%2Fpull%2F6112&data=04%7C01%7Cdoevans%40vmware.com%7C8dc2e892bddd4165b16e08d8e3fe903d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C637510029773259071%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wP7iJXJzYV6fkl%2FXzOmVbkp%2BhcH4eL0ZhrYf4lks0Oo%3D&reserved=0 and updated the ticket with a comment listing the remaining classes that are using PowerMock. Only 7 files remain, so this feels like a very achievable task now. ________________________________ From: Kirk Lund <kl...@apache.org> Sent: Tuesday, March 9, 2021 12:13 PM To: dev@geode.apache.org <dev@geode.apache.org> Subject: Avoid PowerMockito I just reviewed a PR that was adding a unit test using PowerMockito. We've had lots of problems with PowerMockito leaving the unit testing JVM corrupted for later tests. Using PowerMockito also discourages us from refactoring product code to have better design and be easier to unit test. So in previous threads here on dev-list, the community decided to axe our usage of PowerMockito. There are lots of Jira tickets about PowerMockito in Geode: https://nam04.safelinks.protection.outlook.com/?url=https:%2F%2Fissues.apache.org%2Fjira%2Fissues%2F%3Fjql%3Dproject%2520%253D%2520GEODE%2520AND%2520text%2520~%2520%2522PowerMockito%2522&data=04%7C01%7Cdoevans%40vmware.com%7C8dc2e892bddd4165b16e08d8e3fe903d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C637510029773259071%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=mQ43v09i2hfiwumibgekykyNu%2FdXlpmn9ZDG41R0Tko%3D&reserved=0 There is one open ticket for removing PowerMockito from Geode: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FGEODE-6143&data=04%7C01%7Cdoevans%40vmware.com%7C8dc2e892bddd4165b16e08d8e3fe903d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C637510029773259071%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2B1arhtioR6OiHuFYe2AlB6CkO8CUqtIYH2GyZTP30Iw%3D&reserved=0 Unfortunately the assignee is no longer active in this community so we need someone or everyone to pitch in. If you find yourself working on an area of code that has a unit test using PowerMockito, please rewrite the test using regular Mockito and refactor the code that it tests so that you can pass all of its dependencies in via the constructor(s). If anyone would like to volunteer to take on GEODE-6143, please feel free to reassign it. I would be happy to help you out. Thanks, Kirk