summaryrefslogtreecommitdiffstats
path: root/testsuites/performance
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2023-08-10 16:58:48 +0100
committeradheli.tavares <adheli.tavares@est.tech>2023-09-22 16:01:00 +0100
commita3a032d5b902c3e125dccd2bc2b41f22861decc1 (patch)
tree481b0faa916f39da096fe5c935c630b1598f0f7d /testsuites/performance
parent097618956f681eee12a23d7d9dc4f4f22f5347cc (diff)
Java 17 Upgrade
Updated dependencies to latest versions Made Java 17 changes Moved apex dependencies versions to main apex pom Issue-ID: POLICY-4675 Change-Id: Ia5cd5670a1f024f5402cbd7371162ce3313930ef Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'testsuites/performance')
-rw-r--r--testsuites/performance/performance-benchmark-test/pom.xml16
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java14
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java10
-rw-r--r--testsuites/performance/pom.xml2
4 files changed, 20 insertions, 22 deletions
diff --git a/testsuites/performance/performance-benchmark-test/pom.xml b/testsuites/performance/performance-benchmark-test/pom.xml
index 96aa41909..09c8d125a 100644
--- a/testsuites/performance/performance-benchmark-test/pom.xml
+++ b/testsuites/performance/performance-benchmark-test/pom.xml
@@ -20,12 +20,12 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites.performance</groupId>
<artifactId>apex-performance</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>performance-benchmark-test</artifactId>
@@ -39,6 +39,7 @@
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
+ <version>${version.jersey}</version>
</dependency>
<dependency>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
@@ -89,16 +90,11 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
<plugins>
- <!-- Copy required resources and examples -->
+ <!-- Copy required resources and examples -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
@@ -138,7 +134,7 @@
</build>
<profiles>
- <profile>
+ <profile>
<id>only-eclipse</id>
<activation>
<property>
@@ -164,7 +160,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
</pluginExecutions>
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java
index 53e57f295..8e8a699c6 100644
--- a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,14 +23,14 @@
package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator;
import com.google.gson.Gson;
+import jakarta.inject.Inject;
+import jakarta.inject.Provider;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.core.Response;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicReference;
-import javax.inject.Inject;
-import javax.inject.Provider;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Response;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java
index 44a06ee54..75d6d65f3 100644
--- a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,14 +24,15 @@ package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import javax.inject.Provider;
-import javax.ws.rs.core.Response;
+import jakarta.inject.Provider;
+import jakarta.ws.rs.core.Response;
import org.glassfish.grizzly.http.server.Request;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events.OutputEvent;
@@ -38,6 +40,7 @@ import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.even
* Test the EventGeneratorEndpoint class.
*
*/
+@RunWith(MockitoJUnitRunner.class)
public class EventGeneratorEndpointTest {
@Mock
private Provider<Request> httpRequestProviderMock;
@@ -52,7 +55,6 @@ public class EventGeneratorEndpointTest {
*/
@Before
public void initializeMocking() throws ApexException {
- MockitoAnnotations.initMocks(this);
Mockito.doReturn(httpRequestMock).when(httpRequestProviderMock).get();
diff --git a/testsuites/performance/pom.xml b/testsuites/performance/pom.xml
index cca41e3fd..2f9acb48d 100644
--- a/testsuites/performance/pom.xml
+++ b/testsuites/performance/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites</groupId>
<artifactId>apex-testsuites</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.testsuites.performance</groupId>