You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Kirk Lund <kl...@apache.org> on 2017/03/08 01:49:59 UTC

Upgrading to Mockito 2

I've started upgrading to Mockito 2. The branch feature/GEODE-2558 has been
created, and I pushed the initial commit which upgrades to Mockito 2.7.11
and Powermock 1.7.0RC2. There were compilation errors in 34 test classes
which have been fixed already.

GEODE-2558: https://issues.apache.org/jira/browse/GEODE-2558

Here's the initial change-set:
https://git-wip-us.apache.org/repos/asf?p=geode.git;h=ee0ab01

My first pass at precheckin shows 23 failures in geode-core (8 test
classes) and 3 failures in geode-lucene (2 test classes). These are all
unit tests using Mockito.

I'd like to open this up to other contributors to help fix these test
failures.

Here's a really good blog article about upgrading to Mockito 2.1:
https://asolntsev.github.io/en/2016/10/11/mockito-2.1/

Based on reading that article, I suspect we need to fix up the way these 10
test classes are using Mockito.

Each test class which currently has any Mockito 2 related failures now has
a sub-task filed under GEODE-2558.

1) assign the sub-task to yourself
2) click start progress
3) create feature branch for the sub-task
4) when you file the PR be sure to file it against feature/GEODE-2558

Here are examples of creating a feature branch for the sub-task I'm going
to work on (GEODE-2628 StatisticsImplTest):

git:
$ git checkout -b feature/GEODE-2628 feature/GEODE-2558

git-flow:
$ git flow feature start GEODE-2628 feature/GEODE-2558