[ODLPARENT-59] mockito-all is dangerous substance abuse, must always use mockito-core, everywhere; ODL parent could enforce? Created: 23/Jan/17 Updated: 04/Sep/18 Resolved: 04/Sep/18 |
|
| Status: | Resolved |
| Project: | odlparent |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Michael Vorburger | Assignee: | Michael Vorburger |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Description |
|
Just discovered (more remembered actually, had hit this in a past life) that mockito-all is dangerous substance abuse, must always use mockito-core, everywhere; ODL parent could enforce? One can find various posts re. this problem online; incl. e.g. https://github.com/mockito/mockito/issues/324) This is the root cause of the following sudden post merge build failure of https://git.opendaylight.org/gerrit/#/c/44000/ e.g. on https://jenkins.opendaylight.org/releng/job/netvirt-verify-carbon-mvn33-openjdk8/2584/console : 08:15:01 addElanInterface(org.opendaylight.netvirt.elanmanager.tests.ElanServiceTest) Time elapsed: 3.258 sec <<< ERROR! I can fix this short term, but I'm opening this issue to track a number of changes I'm going to be pushing related to this. I'd also like to investigate whether it may be possible to use a maven enforcer rule to completely block usage of mockito-all anywhere in ODL (and switch all current uses of it over to mockito-core). I'd also like to see if it may be possible to run duplicate class entry validation during all ODL builds. |
| Comments |
| Comment by Michael Vorburger [ 23/Jan/17 ] |
|
See External References field for a number of Gerrits I'm raising re. this... |
| Comment by Stephen Kitt [ 23/Jan/17 ] |
|
(In reply to Michael Vorburger from comment #0) Yes, we should enforce this once we've migrated everyone away (weather event...). This will also help with the migration to Mockito 2 which drops mockito-all. |
| Comment by Michael Vorburger [ 23/Jan/17 ] |
|
> run duplicate class entry validation during all ODL builds see https://git.opendaylight.org/gerrit/#/c/50908/ req. > This will also help with the migration to Mockito 2 which drops mockito-all. Yeah, that may be trivial after this - I'll have done all the hard work required for that under this here! E.g. things like adjusting https://git.opendaylight.org/gerrit/#/c/50861/ |
| Comment by Michael Vorburger [ 14/Feb/17 ] |
|
We had 5 unreactive/dead projects blocking progress on this front. Today those 5 projects were removed from autorelease, see: and:
With this mockito-all should now not be used anywhere in ODL anymore. https://git.opendaylight.org/gerrit/#/c/50844/ can go next, then done. |
| Comment by Michael Vorburger [ 04/Sep/18 ] |
|
This was fully done (AFAIK) a VERY LONG time ago, already; dunno why I had kept this issue open. |