From 80735e2a3e39509801f9205084943c8857ccd1a3 Mon Sep 17 00:00:00 2001 From: "aravind.est" Date: Thu, 4 Sep 2025 16:22:42 +0100 Subject: [PATCH] Spring Boot version upgraded to 3.5.5 Spring boot version upgraded. Root Log level updated to INFO Issue-ID: INT-193 Change-Id: Ic9faa5930a2c8a44fa69192b85007f51c12ec27a Signed-off-by: aravind.est --- config/application.yaml | 7 +++++-- pom.xml | 6 ++++-- src/test/java/org/oransc/ics/ApplicationTest.java | 14 +++++--------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/config/application.yaml b/config/application.yaml index 966c15d..a109b34 100644 --- a/config/application.yaml +++ b/config/application.yaml @@ -1,5 +1,6 @@ # ============LICENSE_START=============================================== -# Copyright (C) 2019-2022 Nordix Foundation. All rights reserved. +# Copyright (C) 2019-2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2025 OpenInfra Foundation Europe # ======================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -33,12 +34,14 @@ management: endpoint: shutdown: enabled: true + heapdump: + enabled: true lifecycle: timeout-per-shutdown-phase: "20s" logging: # Configuration of logging level: - ROOT: ERROR + ROOT: INFO org.springframework: ERROR org.springframework.data: ERROR org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR diff --git a/pom.xml b/pom.xml index 4ba94d0..1ba6fc8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ * O-RAN-SC * %% * Copyright (C) 2019-2023 Nordix Foundation. All rights reserved. -* Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved. +* Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ org.springframework.boot spring-boot-starter-parent - 3.2.0 + 3.5.5 org.o-ran-sc.nonrtric.plt @@ -59,6 +59,7 @@ 0.8.8 2.0.2 1.6.14 + 5.1.0 true @@ -164,6 +165,7 @@ com.squareup.okhttp3 mockwebserver + ${mockwebserver.version} test diff --git a/src/test/java/org/oransc/ics/ApplicationTest.java b/src/test/java/org/oransc/ics/ApplicationTest.java index a0d39b5..8c60f51 100644 --- a/src/test/java/org/oransc/ics/ApplicationTest.java +++ b/src/test/java/org/oransc/ics/ApplicationTest.java @@ -98,8 +98,8 @@ import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatusCode; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; +import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.web.reactive.function.client.WebClientRequestException; import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; @@ -1332,8 +1332,9 @@ class ApplicationTest { } @Test + @DirtiesContext @SuppressWarnings("squid:S2925") // "Thread.sleep" should not be used in tests. - void testZZActuator() throws Exception { + void testZZActuator() { // The test must be run last, hence the "ZZ" in the name. All succeeding tests // will fail. AsyncRestClient client = restClient(); @@ -1342,13 +1343,8 @@ class ApplicationTest { assertThat(resp).contains("TRACE"); 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(ConsumerConsts.API_ROOT + "/info-jobs")) // Any call - .expectSubscription() // - .expectErrorMatches(WebClientRequestException.class::isInstance) // - .verify(); + String shutdownResponse = client.post("/actuator/shutdown", "").block(); + assertThat(shutdownResponse).contains("Shutting down"); } private String typeSubscriptionUrl() { -- 2.16.6