<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
- <artifactId>spring-boot-30-starter-parent</artifactId>
- <version>2.5.5</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>20230227</json.version>
+ <json.version>20240303</json.version>
<localstack.version>1.20.1</localstack.version>
<junit.jupiter.version>1.20.1</junit.jupiter.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.11.0</commons-io.version>
- <guava.version>31.0.1-jre</guava.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>
<allowskiptests>false</allowskiptests>
</properties>
<dependencies>
- <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>
- </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
}
@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