Hi Ismael, Thanks for starting this discussion. I had a quick look at the PR and I agree that the updated tests are more readable. So +1 from me.
On Tue, Oct 2, 2018 at 12:06 AM Colin McCabe <cmcc...@apache.org> wrote: > +1. It would be good to standardize on one (well-maintained) mocking > library in the project :) > > best, > Colin > > > On Sun, Sep 30, 2018, at 20:32, Ismael Juma 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 >