GitHub user ilooner opened a pull request: https://github.com/apache/drill/pull/1045
DRILL-5730 Test Mocking Improvements ## DRILL-5730 - Switched to using the interface for FragmentContext everywhere instead of passing around the concrete class. - Minor refactoring of FragmentContext public methods - Switched to using the OptionSet interface throughout the codebase instead of OptionManager - Renamed **FragmentContext** to **FragmentContextImpl** and renamed **FragmentContextInterface** to **FragmentContext**. - Removed JMockit from most unit tests in favor of Mockito. Unfortunately it cannot be removed some some of the unit tests which depend on it for mocking private method and static methods (which is functionality only JMockit provides). In the future we need to refactor the code so that these remaining tests can have JMockit removed completely. - Refactored some tests to use a mock class of FragmentContext - Some tests were using Mockito and JMockit when there was no need for a mocking framework ## Misc - Removed commented out code and unused imports - Removed unnecessary modifiers from methods in interfaces - Fixed a bug in bootstrapcontext which leaked threads - Fixed javadoc links that were broken You can merge this pull request into a Git repository by running: $ git pull https://github.com/ilooner/drill DRILL-5730 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/1045.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1045 ---- commit b4b4de83db5df20f2fa56387f5756df0ead3ec17 Author: Paul Rogers <prog...@maprtech.com> Date: 2017-10-05T05:43:44Z DRILL-5842: Refactor fragment, operator contexts commit 0a2d938cee7d5d47d3ac0d666ace8163efb3af83 Author: Paul Rogers <prog...@maprtech.com> Date: 2017-10-06T06:24:56Z Fixes for tests which mock contexts commit 34cd7494c68f0934fdf5f455748863be873b3995 Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-10-16T18:28:54Z - Removed commented out code - Removed redundant modifiers on interface methods commit a4944b20abe226a990adc775a3641b44c0b173bb Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-10-16T19:36:23Z - Some more minor code cleanup commit 13f35109a30f03414223c84f4f4fb664ab344e6e Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-10-17T19:30:59Z - Deleted commented out code - Removed unused variables - Replaced usage of FragmentContext with FragmentContextInterface - Refactored OptionSet and FragmentContextInterface interfaces commit 629da8ff3bd40b3269747cf54a88754da3266346 Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-10-18T19:37:37Z - More changes to the FragmentContextInterface - Replaced more usages of FragmentContext with FragmentContextInterface - Replaced usages of OptionManager with OptionSet commit 71f9a1c7d2c8b2f60398348d57344c56a68f556c Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-10-18T19:52:01Z - Removed unused import commit b189350a20e3527d8b6c7df82fdb8641a359dad4 Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-10-18T22:21:52Z - Fixed broken unit tests commit 27f88376c7ad5da384570de0a3eafeb16393829d Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-07T19:02:43Z - Deleted unused fields commit 5f3e3ce93aba98e2e20abd0a187392d38a78c374 Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-09T02:48:44Z - Removed unused variables - Removed use of Jmockit from unit tests - Minor code cleanup commit df4b0c1fed0f2d34292e6e635635cee4c6f2f2af Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-09T21:42:00Z - Fixed java-exec build and test errors commit 8113edb320f2ff12e26bd87f82b23fd47a9513cd Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-16T00:46:34Z - Fixed broken test - Removed broken TestOptiqPlans - Completed replacing references to FragmentContext with FragmentContextInterface commit b1fee4ff6e5c6dde14239732baae193ea752f21e Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-16T00:58:45Z - Moved TestHashJoin off of JMockit commit f94a115eddfbbae8db861e6e97481197c9100f6c Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-16T20:52:03Z - Removed more dependencies on JMockit commit d2178e262885f073cbb0d3daab1640a36f505805 Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-20T20:28:29Z - Finished migrating most of the tests off of JMockit - Tests pass commit 58ca0d1d42b931509dcff013346f2374556d5080 Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-20T23:41:41Z - Fixed a test bug commit c176d36625b115e7990db0bc3fbaa3e1f5dcb2f7 Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-21T00:52:09Z - Fixed compilation issue commit b3d13d937e56dc82ec35f6e784ec8111e7a9e4de Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-21T18:17:59Z - Fixed broken tests commit 18bb70e6bb0ad8c5b87b8f6ec40e121240525d04 Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-21T19:36:49Z - Code cleanup to prep for PR commit f927a7b9d0540bae29e2b3fee632c7464241714b Author: Timothy Farkas <timothyfar...@apache.org> Date: 2017-11-21T21:21:17Z - Renamed FragmentContext FragmentContextImpl and renamed FragmentContextInterface FragmentContext ---- ---