aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl/participant-impl-simulator/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'participant/participant-impl/participant-impl-simulator/src/test')
-rwxr-xr-x[-rw-r--r--]participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/parameters/ParticipantSimParametersTest.java4
-rwxr-xr-x[-rw-r--r--]participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/rest/ActuatorControllerTest.java19
-rwxr-xr-x[-rw-r--r--]participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/utils/CommonActuatorController.java12
3 files changed, 17 insertions, 18 deletions
diff --git a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/parameters/ParticipantSimParametersTest.java b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/parameters/ParticipantSimParametersTest.java
index 7e5df4c89..0f6e2d45b 100644..100755
--- a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/parameters/ParticipantSimParametersTest.java
+++ b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/parameters/ParticipantSimParametersTest.java
@@ -22,8 +22,8 @@ package org.onap.policy.clamp.acm.participant.sim.parameters;
import static org.assertj.core.api.Assertions.assertThat;
-import javax.validation.Validation;
-import javax.validation.ValidatorFactory;
+import jakarta.validation.Validation;
+import jakarta.validation.ValidatorFactory;
import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.acm.participant.sim.comm.CommonTestData;
diff --git a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/rest/ActuatorControllerTest.java b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/rest/ActuatorControllerTest.java
index 474d45cc5..08557f56d 100644..100755
--- a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/rest/ActuatorControllerTest.java
+++ b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/rest/ActuatorControllerTest.java
@@ -22,20 +22,19 @@ package org.onap.policy.clamp.acm.participant.sim.rest;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import javax.ws.rs.client.Invocation;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.core.Response;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.onap.policy.clamp.acm.participant.sim.utils.CommonActuatorController;
-import org.springframework.boot.test.autoconfigure.actuate.metrics.AutoConfigureMetrics;
+import org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.server.LocalServerPort;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit.jupiter.SpringExtension;
-@AutoConfigureMetrics
+@AutoConfigureObservability(tracing = false)
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@ActiveProfiles("test")
@@ -70,22 +69,22 @@ class ActuatorControllerTest extends CommonActuatorController {
@Test
void testGetHealth() throws Exception {
- Invocation.Builder invocationBuilder = super.sendActRequest(HEALTH_ENDPOINT);
- Response rawresp = invocationBuilder.buildGet().invoke();
+ var invocationBuilder = super.sendActRequest(HEALTH_ENDPOINT);
+ var rawresp = invocationBuilder.buildGet().invoke();
assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
}
@Test
void testGetMetrics() throws Exception {
- Invocation.Builder invocationBuilder = super.sendActRequest(METRICS_ENDPOINT);
- Response rawresp = invocationBuilder.buildGet().invoke();
+ var invocationBuilder = super.sendActRequest(METRICS_ENDPOINT);
+ var rawresp = invocationBuilder.buildGet().invoke();
assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
}
@Test
void testGePrometheus() throws Exception {
- Invocation.Builder invocationBuilder = super.sendActRequest(PROMETHEUS_ENDPOINT);
- Response rawresp = invocationBuilder.buildGet().invoke();
+ var invocationBuilder = super.sendActRequest(PROMETHEUS_ENDPOINT);
+ var rawresp = invocationBuilder.buildGet().invoke();
assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
}
diff --git a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/utils/CommonActuatorController.java b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/utils/CommonActuatorController.java
index 846e76349..b5e2ff618 100644..100755
--- a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/utils/CommonActuatorController.java
+++ b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/utils/CommonActuatorController.java
@@ -22,12 +22,12 @@ package org.onap.policy.clamp.acm.participant.sim.utils;
import static org.junit.Assert.assertEquals;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Invocation;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.client.WebTarget;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import org.onap.policy.common.gson.GsonMessageBodyHandler;