I have used Mockito and am a big fan -- I had never used EasyMock until recently. The concept of record vs. replay mode in EasyMock really annoyed me -- I'm a fan of the "NO MODES" idea ( https://en.wikipedia.org/wiki/Larry_Tesler), and when I encountered it in EasyMock in the context of Kafka development I just gritted my teeth and learned/used it as required. I'm very pleased that Mockito is being seriously considered as a replacement. Mockito started as an EasyMock fork, I guess, and the project readily admits it is standing on the shoulders of giants in many respects, but I think one of the best things they ever did was jettison the concept of modes.
+1 from me. Ron On Fri, Oct 5, 2018 at 10:00 AM Ismael Juma <ism...@juma.me.uk> wrote: > So far, it seems like people are in favour. If no objections are presented > in the next couple of days, we will go ahead with the change. > > Ismael > > On Sun, 30 Sep 2018, 20:32 Ismael Juma, <ism...@juma.me.uk> wrote: > > > Hi all, > > > > As described in KAFKA-7438 > > <https://issues.apache.org/jira/browse/KAFKA-7438>, EasyMock's > > development has stagnated. This presents a number of issues: > > > > 1. Blocks us from running tests with newer Java versions, which is a > > frequent occurrence give the new Java release cadence. It is the main > > blocker in switching Jenkins from Java 10 to Java 11 at the moment. > > 2. Integration with newer testing libraries like JUnit 5 is slow to > appear > > (if it appears at all). > > 3. No API improvements. Mockito started as an EasyMock fork, but has > > continued to evolve and, in my opinion, it's more intuitive now. > > > > I think we should switch to Mockito for new tests and to incrementally > > migrate the existing ones as time allows. To make the proposal concrete, > I > > went ahead and converted all the tests in the `clients` module: > > > > https://github.com/apache/kafka/pull/5691 > > > > I think the updated tests are nicely readable. I also removed PowerMock > > from the `clients` tests as we didn't really need it and its development > > has also stagnated a few months ago. I think we can easily remove > PowerMock > > elsewhere with the exception of `Connect` where we may need to keep it > for > > a while. > > > > Let me know your thoughts. Aside from the general future direction, I'd > > like to get the PR for KAFKA-7439 reviewed and merged soonish as merge > > conflicts will creep in quickly. > > > > Ismael > > >