diff options
author | 2024-07-24 09:56:46 +0100 | |
---|---|---|
committer | 2024-07-24 09:06:26 +0000 | |
commit | a2f6493f89eff78a78d8ba2aa34f6080d6ab8830 (patch) | |
tree | 62acfbf410ce9986d9d3b2d7d3115fd073bf1d5b /participant/participant-impl | |
parent | b2bc0f63a484abe5b77b1e921d820ae80481602b (diff) |
Fix sonar issue for ACM
Issue-ID: POLICY-5065
Change-Id: Id95e8dbd4be14db36eb2fa4ddfc852d37572f25a
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant/participant-impl')
2 files changed, 7 insertions, 7 deletions
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"); diff --git a/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/PodStatusValidatorTest.java b/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/PodStatusValidatorTest.java index 5640ac4be..c9253856b 100644 --- a/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/PodStatusValidatorTest.java +++ b/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/PodStatusValidatorTest.java @@ -47,8 +47,8 @@ class PodStatusValidatorTest { private static final Coder CODER = new StandardCoder(); private static final String CHART_INFO_YAML = "src/test/resources/ChartList.json"; - private static int TIMEOUT = 2; - private static int STATUS_CHECK_INTERVAL = 1; + private static final int TIMEOUT = 2; + private static final int STATUS_CHECK_INTERVAL = 1; private static List<ChartInfo> charts; @InjectMocks |