From a2f6493f89eff78a78d8ba2aa34f6080d6ab8830 Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Wed, 24 Jul 2024 09:56:46 +0100 Subject: Fix sonar issue for ACM Issue-ID: POLICY-5065 Change-Id: Id95e8dbd4be14db36eb2fa4ddfc852d37572f25a Signed-off-by: FrancescoFioraEst --- .../participant/kserve/k8s/InferenceServiceValidatorTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'participant/participant-impl/participant-impl-kserve') diff --git a/participant/participant-impl/participant-impl-kserve/src/test/java/org/onap/policy/clamp/acm/participant/kserve/k8s/InferenceServiceValidatorTest.java b/participant/participant-impl/participant-impl-kserve/src/test/java/org/onap/policy/clamp/acm/participant/kserve/k8s/InferenceServiceValidatorTest.java index 5bf7bf13b..70285f778 100644 --- a/participant/participant-impl/participant-impl-kserve/src/test/java/org/onap/policy/clamp/acm/participant/kserve/k8s/InferenceServiceValidatorTest.java +++ b/participant/participant-impl/participant-impl-kserve/src/test/java/org/onap/policy/clamp/acm/participant/kserve/k8s/InferenceServiceValidatorTest.java @@ -36,15 +36,15 @@ class InferenceServiceValidatorTest { private static final int TIMEOUT = 2; private static final int STATUS_CHECK_INTERVAL = 1; - private static final String inferenceSvcName = "inference-test"; - private static final String namespace = "test"; + private static final String INFERENCE_SVC_NAME = "inference-test"; + private static final String NAMESPACE = "test"; @Test void test_runningPodState() throws IOException, ApiException { var kserveClient = mock(KserveClient.class); doReturn("True").when(kserveClient).getInferenceServiceStatus(any(), any()); var inferenceServiceValidator = - new InferenceServiceValidator(inferenceSvcName, namespace, TIMEOUT, STATUS_CHECK_INTERVAL, + new InferenceServiceValidator(INFERENCE_SVC_NAME, NAMESPACE, TIMEOUT, STATUS_CHECK_INTERVAL, kserveClient); assertDoesNotThrow(inferenceServiceValidator::run); } @@ -54,7 +54,7 @@ class InferenceServiceValidatorTest { var kserveClient = mock(KserveClient.class); doReturn("").when(kserveClient).getInferenceServiceStatus(any(), any()); var inferenceServiceValidator = - new InferenceServiceValidator("", namespace, TIMEOUT, STATUS_CHECK_INTERVAL, + new InferenceServiceValidator("", NAMESPACE, TIMEOUT, STATUS_CHECK_INTERVAL, kserveClient); assertThatThrownBy(inferenceServiceValidator::run).isInstanceOf(KserveException.class) .cause().hasMessage("Kserve setup is unavailable for inference service to be deployed"); @@ -65,7 +65,7 @@ class InferenceServiceValidatorTest { var kserveClient = mock(KserveClient.class); doReturn("False").when(kserveClient).getInferenceServiceStatus(any(), any()); var inferenceServiceValidator = - new InferenceServiceValidator(inferenceSvcName, namespace, TIMEOUT, STATUS_CHECK_INTERVAL, + new InferenceServiceValidator(INFERENCE_SVC_NAME, NAMESPACE, TIMEOUT, STATUS_CHECK_INTERVAL, kserveClient); assertThatThrownBy(inferenceServiceValidator::run).isInstanceOf(KserveException.class) .hasMessage("Error verifying the status of the inference service. Exiting"); -- cgit 1.2.3-korg