diff options
Diffstat (limited to 'participant/participant-impl/participant-impl-kserve')
3 files changed, 12 insertions, 10 deletions
diff --git a/participant/participant-impl/participant-impl-kserve/pom.xml b/participant/participant-impl/participant-impl-kserve/pom.xml index 2f6272b52..05cc2dcd2 100644 --- a/participant/participant-impl/participant-impl-kserve/pom.xml +++ b/participant/participant-impl/participant-impl-kserve/pom.xml @@ -25,7 +25,7 @@ <parent> <groupId>org.onap.policy.clamp.participant</groupId> <artifactId>policy-clamp-participant-impl</artifactId> - <version>8.0.0-SNAPSHOT</version> + <version>8.0.1-SNAPSHOT</version> </parent> <artifactId>policy-clamp-participant-impl-kserve</artifactId> @@ -52,7 +52,7 @@ <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> - <version>2022.0.5</version> + <version>2023.0.3</version> <type>pom</type> <scope>import</scope> </dependency> diff --git a/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/config/MicrometerConfig.java b/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/config/MicrometerConfig.java index 92dc5d3d6..1192f7703 100644 --- a/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/config/MicrometerConfig.java +++ b/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/config/MicrometerConfig.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2023 Nordix Foundation. + * Copyright (C) 2023-2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ package org.onap.policy.clamp.acm.participant.kserve.config; import io.micrometer.core.aop.TimedAspect; import io.micrometer.core.instrument.MeterRegistry; import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -34,8 +35,9 @@ public class MicrometerConfig { * Load up the metrics registry. */ @Bean - public InitializingBean forcePrometheusPostProcessor(BeanPostProcessor meterRegistryPostProcessor, - MeterRegistry registry) { + public InitializingBean forcePrometheusPostProcessor(@Qualifier("meterRegistryPostProcessor") + BeanPostProcessor meterRegistryPostProcessor, + MeterRegistry registry) { return () -> meterRegistryPostProcessor.postProcessAfterInitialization(registry, ""); } 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"); |