-
Improvement
-
Resolution: Done
-
Medium
-
None
-
None
-
None
-
Operating System: All
Platform: All
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!
08:15:01 java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.hamcrest.Matcher.describeMismatch(Ljava/lang/Object;Lorg/hamcrest/Description;)V
08:15:01 at java.util.concurrent.FutureTask.report(FutureTask.java:122)
08:15:01 at java.util.concurrent.FutureTask.get(FutureTask.java:206)
08:15:01 at org.awaitility.core.ConditionAwaiter$1.run(ConditionAwaiter.java:160)
08:15:01 at java.lang.Thread.run(Thread.java:745)
08:15:01 Caused by: java.lang.NoSuchMethodError: org.hamcrest.Matcher.describeMismatch(Ljava/lang/Object;Lorg/hamcrest/Description;)V
08:15:01 at org.awaitility.core.AbstractHamcrestCondition.getMismatchMessage(AbstractHamcrestCondition.java:77)
08:15:01 at org.awaitility.core.AbstractHamcrestCondition.access$300(AbstractHamcrestCondition.java:25)
08:15:01 at org.awaitility.core.AbstractHamcrestCondition$1.eval(AbstractHamcrestCondition.java:55)
08:15:01 at org.awaitility.core.ConditionAwaiter$ConditionPoller.run(ConditionAwaiter.java:215)
08:15:01 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
08:15:01 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
08:15:01 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
08:15:01 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
08:15:01 ... 1 more
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.