<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>
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;
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;
@Autowired
OpenPolicyAgentSimulatorController openPolicyAgentSimulatorController;
- private static Gson gson = new GsonBuilder().create();
-
/**
* Overrides the BeanFactory.
*/
}
@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
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