From: Ahmed Abbas Date: Wed, 15 Jan 2020 01:20:34 +0000 (+0200) Subject: fix powerMock and mockito versions mismatch X-Git-Tag: 1.0.0~41 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=transportpce.git;a=commitdiff_plain;h=1ba392fd93aeda266371bcebde3f6a3afdae83d8 fix powerMock and mockito versions mismatch this was causing failures in OLM PowerMgmtPowerMockTest Junit and in OlmPowerServiceImplTest that is not completely fixed yet. JIRA: TRNSPRTPCE-180 Change-Id: I0937f92c63a3999314dcb36ec0b02a65a46d5ff5 Signed-off-by: Ahmed Abbas --- diff --git a/olm/pom.xml b/olm/pom.xml index f5ca98208..18aa436e9 100644 --- a/olm/pom.xml +++ b/olm/pom.xml @@ -30,14 +30,28 @@ and is available at http://www.eclipse.org/legal/epl-v10.html ${project.version} + + org.mockito + mockito-core + 2.25.0 + test + + + org.powermock + powermock-core + 2.0.2 + test + org.powermock powermock-api-mockito2 + 2.0.2 test org.powermock powermock-module-junit4 + 2.0.2 test diff --git a/olm/src/test/java/org/opendaylight/transportpce/olm/power/PowerMgmtPowerMockTest.java b/olm/src/test/java/org/opendaylight/transportpce/olm/power/PowerMgmtPowerMockTest.java index 345fcb630..7656d2a30 100644 --- a/olm/src/test/java/org/opendaylight/transportpce/olm/power/PowerMgmtPowerMockTest.java +++ b/olm/src/test/java/org/opendaylight/transportpce/olm/power/PowerMgmtPowerMockTest.java @@ -15,7 +15,6 @@ import java.util.Map; import java.util.Optional; import org.junit.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentMatchers; @@ -117,7 +116,6 @@ public class PowerMgmtPowerMockTest extends AbstractTest { this.deviceTransactionManager); } - @Ignore @Test public void testSetPowerMockingUtil() { PowerMockito.mockStatic(OlmUtils.class); @@ -129,7 +127,6 @@ public class PowerMgmtPowerMockTest extends AbstractTest { } - @Ignore @Test public void testSetPowerMockingUtilNetwokType() throws OpenRoadmInterfaceException { PowerMockito.mockStatic(OlmUtils.class); @@ -151,7 +148,6 @@ public class PowerMgmtPowerMockTest extends AbstractTest { } - @Ignore @Test public void testSetPowerMockingUtilNetwokTypeMoreThanOneNode() throws OpenRoadmInterfaceException { PowerMockito.mockStatic(OlmUtils.class); @@ -173,7 +169,6 @@ public class PowerMgmtPowerMockTest extends AbstractTest { } - @Ignore @Test public void testSetPowerXpdrNodes() { PowerMockito.mockStatic(OlmUtils.class); @@ -185,7 +180,6 @@ public class PowerMgmtPowerMockTest extends AbstractTest { } - @Ignore @Test public void testSetPowerRdmNodesReturnInterfaceEmpty() throws OpenRoadmInterfaceException { PowerMockito.mockStatic(OlmUtils.class); @@ -200,7 +194,6 @@ public class PowerMgmtPowerMockTest extends AbstractTest { Assert.assertEquals(false, output); } - @Ignore @Test public void testSetPowerRdmNodesThrowsException() throws OpenRoadmInterfaceException { PowerMockito.mockStatic(OlmUtils.class); @@ -215,7 +208,6 @@ public class PowerMgmtPowerMockTest extends AbstractTest { Assert.assertEquals(false, output); } - @Ignore @Test public void testSetPowerRdmNodesReturnInterface() throws OpenRoadmInterfaceException { PowerMockito.mockStatic(OlmUtils.class);