Dependecy update in a1pms using spring parent 3.3.2 27/138827/4
authorlapentafd <francesco.lapenta@est.tech>
Tue, 20 Aug 2024 13:24:11 +0000 (14:24 +0100)
committerlapentafd <francesco.lapenta@est.tech>
Fri, 23 Aug 2024 13:52:48 +0000 (14:52 +0100)
Issue-ID: CCSDK-4026
Change-Id: I8d53fd8a2918c154a390d44181e6a96bf476a6db
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
a1-policy-management/pom.xml
a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/MetersTest.java
a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java

index 1455bad..87cc897 100644 (file)
@@ -24,8 +24,8 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
-        <artifactId>spring-boot-31-starter-parent</artifactId>
-        <version>2.6.1</version>
+        <artifactId>spring-boot-33-starter-parent</artifactId>
+        <version>2.8.0-SNAPSHOT</version>
         <relativePath/>
     </parent>
     <groupId>org.onap.ccsdk.oran</groupId>
         <java.version.source>17</java.version.source>
         <java.version.target>17</java.version.target>
         <gson.version>2.10.1</gson.version>
-        <json.version>20231013</json.version>
+        <json.version>20240303</json.version>
         <formatter-maven-plugin.version>2.22.0</formatter-maven-plugin.version>
         <spotless-maven-plugin.version>2.35.0</spotless-maven-plugin.version>
-        <commons-io.version>2.14.0</commons-io.version>
-        <guava.version>32.0.1-jre</guava.version>
+        <commons-io.version>2.16.1</commons-io.version>
+        <guava.version>33.3.0-jre</guava.version>
         <springdoc.version>2.0.2</springdoc.version>
         <docker-maven-plugin>0.30.0</docker-maven-plugin>
         <surefire-maven-plugin.version>3.0.0-M8</surefire-maven-plugin.version>
         <surefire-report-plugin.version>3.0.0-M8</surefire-report-plugin.version>
         <jacoco-maven-plugin.version>0.8.8</jacoco-maven-plugin.version>
         <ccsdk.project.version>${project.version}</ccsdk.project.version>
-        <software.amazon.awssdk.version>2.20.12</software.amazon.awssdk.version>
+        <software.amazon.awssdk.version>2.27.8</software.amazon.awssdk.version>
+        <mapstruct.version>1.6.0</mapstruct.version>
         <allowskiptests>false</allowskiptests>
     </properties>
     <dependencies>
         <dependency>
             <groupId>org.openapitools</groupId>
             <artifactId>jackson-databind-nullable</artifactId>
-            <version>0.2.4</version>
-        </dependency>
-        <dependency>
-            <!-- Temporary until version 2 is included by the parent spring-boot-starter-parent  -->
-            <groupId>org.yaml</groupId>
-            <artifactId>snakeyaml</artifactId>
-            <version>2.0</version>
+            <version>0.2.6</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <groupId>org.flywaydb</groupId>
             <artifactId>flyway-core</artifactId>
         </dependency>
-        <dependency>
-            <!-- May be possible to remove this later when ccsdk parent bom stabilizes -->
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-            <version>3.1.0</version>
-        </dependency>
         <dependency>
             <groupId>org.aspectj</groupId>
             <artifactId>aspectjweaver</artifactId>
         <dependency>
             <groupId>org.mapstruct</groupId>
             <artifactId>mapstruct</artifactId>
-            <version>1.5.5.Final</version>
+            <version>${mapstruct.version}</version>
         </dependency>
         <dependency>
             <groupId>org.mapstruct</groupId>
             <artifactId>mapstruct-processor</artifactId>
-            <version>1.5.5.Final</version>
+            <version>${mapstruct.version}</version>
         </dependency>
         <!-- Actuator dependencies -->
         <dependency>
         <dependency>
             <groupId>com.github.erosb</groupId>
             <artifactId>everit-json-schema</artifactId>
-            <version>1.14.0</version>
+            <version>1.14.4</version>
         </dependency>
         <!-- For Tracing -->
         <dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-actuator-autoconfigure</artifactId>
-            <version>3.1.0</version>
         </dependency>
     </dependencies>
     <dependencyManagement>
             <dependency>
                 <groupId>io.opentelemetry</groupId>
                 <artifactId>opentelemetry-bom</artifactId>
-                <version>1.38.0</version>
+                <version>1.41.0</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
             <dependency>
                 <groupId>io.opentelemetry.instrumentation</groupId>
                 <artifactId>opentelemetry-instrumentation-bom-alpha</artifactId>
-                <version>2.4.0-alpha</version>
+                <version>2.7.0-alpha</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index 922d139..c714268 100644 (file)
@@ -22,8 +22,8 @@ package org.onap.ccsdk.oran.a1policymanagementservice.configuration;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
-import io.micrometer.prometheus.PrometheusConfig;
-import io.micrometer.prometheus.PrometheusMeterRegistry;
+import io.micrometer.prometheusmetrics.PrometheusConfig;
+import io.micrometer.prometheusmetrics.PrometheusMeterRegistry;
 
 import java.time.Instant;
 import java.util.Arrays;
index 0519c2d..be6d43f 100644 (file)
@@ -28,8 +28,6 @@ import static org.mockito.Mockito.doReturn;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
 
 import java.lang.invoke.MethodHandles;
 import java.nio.charset.StandardCharsets;
@@ -104,7 +102,6 @@ import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.test.context.TestPropertySource;
 import org.springframework.util.FileSystemUtils;
-import org.springframework.web.reactive.function.client.WebClientRequestException;
 import org.springframework.web.reactive.function.client.WebClientResponseException;
 
 import reactor.core.publisher.Mono;
@@ -163,8 +160,6 @@ class ApplicationTest {
     @Autowired
     OpenPolicyAgentSimulatorController openPolicyAgentSimulatorController;
 
-    private static Gson gson = new GsonBuilder().create();
-
     /**
      * Overrides the BeanFactory.
      */
@@ -235,7 +230,6 @@ class ApplicationTest {
     }
 
     @Test
-    @SuppressWarnings("squid:S2925") // "Thread.sleep" should not be used in tests.
     @DisplayName("test ZZ Actuator")
     void testZZActuator() throws Exception {
         // The test must be run last, hence the "ZZ" in the name. All succeeding tests
@@ -251,15 +245,9 @@ class ApplicationTest {
         client.post("/actuator/loggers/org.springframework.boot.actuate", "{\"configuredLevel\":\"trace\"}").block();
 
         // This will stop the web server and all coming tests will fail.
-        client.post("/actuator/shutdown", "").block();
-
-        Thread.sleep(1000);
-
-        StepVerifier.create(restClient().get("/rics")) // Any call
-                .expectSubscription() //
-                .expectErrorMatches(t -> t instanceof WebClientRequestException) //
-                .verify();
-
+        ResponseEntity<String> entity = client.postForEntity("/actuator/shutdown", "").block();
+        assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
+        assertThat(((String) entity.getBody())).contains("Shutting down");
     }
 
     @Test