From 59178f7231980682c9483d3ed8a6bf5307473f9b Mon Sep 17 00:00:00 2001 From: jitendra007 Date: Tue, 18 Aug 2020 14:04:11 +0530 Subject: Migrate from java 8 to 11 Issue-ID: VNFSDK-632 Signed-off-by: jitendra007 Change-Id: Ida39e4d4be466ad1b4b64860f536a811500eb994 --- vnfmarket-be/vnf-sdk-marketplace/pom.xml | 13 +++++++++++-- .../vnfsdk/marketplace/resource/PackageResourceTest.java | 8 +++++--- 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'vnfmarket-be') diff --git a/vnfmarket-be/vnf-sdk-marketplace/pom.xml b/vnfmarket-be/vnf-sdk-marketplace/pom.xml index 8c5adf7e..bd203acc 100644 --- a/vnfmarket-be/vnf-sdk-marketplace/pom.xml +++ b/vnfmarket-be/vnf-sdk-marketplace/pom.xml @@ -26,11 +26,17 @@ false false 3.12.0 + 1.43 + + javax.xml.bind + jaxb-api + 2.3.1 + org.onap.cli @@ -205,7 +211,7 @@ due to Security Issues:- CVE-2019-10241,CVE-2019-10247,CVE-2019-10246 org.jmockit jmockit - 1.19 + ${jmockit.version} test @@ -264,7 +270,10 @@ due to Security Issues:- CVE-2019-10241,CVE-2019-10247,CVE-2019-10246 2.20 always - ${surefireArgLine} + + -javaagent:${settings.localRepository}/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar + + ${maven.test.skip} ${maven.test.failure.ignore} diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java b/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java index 2ecb5a76..bf71dfea 100644 --- a/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java +++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java @@ -75,6 +75,8 @@ import org.onap.vnfsdk.marketplace.wrapper.PackageWrapper; import org.onap.vnfsdk.marketplace.wrapper.PackageWrapperUtil; import org.open.infc.grpc.Result; import org.open.infc.grpc.client.OpenRemoteCli; +import javax.servlet.ServletRequest; +import mockit.Mocked; import mockit.Mock; import mockit.MockUp; @@ -1016,8 +1018,8 @@ public class PackageResourceTest { } @Test - public void testUpdateStatusSuccess() { - MockUp mockReq = new MockUp() { + public void testUpdateStatusSuccess(@Mocked HttpServletRequest request) { + new MockUp() { @Mock public ServletInputStream getInputStream() throws IOException { @@ -1047,7 +1049,7 @@ public class PackageResourceTest { }; try { - response = packageResource.updateValidateStatus((HttpServletRequest) mockReq.getMockInstance(), null); + response = packageResource.updateValidateStatus(request, null); } catch(Exception e) { e.printStackTrace(); } -- cgit 1.2.3-korg