From 5180f3f32a2cdd35206f728e0fd7dd6ad62b567a Mon Sep 17 00:00:00 2001 From: Filip Krzywka Date: Tue, 8 Jan 2019 07:53:25 +0100 Subject: Merge Healthcheck descriptions - start new API server for healthchecks in xNF simulator on port 6063 - changed DCAE App default port to 6064 - switched to InetSocketAddresses usage in components configurations Change-Id: I398f9ea6e887f78d88286ed717d310d3297b1571 Issue-ID: DCAEGEN2-1063 Signed-off-by: Filip Krzywka --- .../kotlin/org/onap/dcae/collectors/veshv/factory/CollectorFactory.kt | 2 +- .../collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt | 2 +- .../collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'sources/hv-collector-core/src') diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/CollectorFactory.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/CollectorFactory.kt index fe2b89d5..861065c1 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/CollectorFactory.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/CollectorFactory.kt @@ -56,7 +56,7 @@ class CollectorFactory(val configuration: ConfigurationProvider, } .doOnError { logger.error { "Failed to acquire configuration from consul" } - healthState.changeState(HealthDescription.CONSUL_CONFIGURATION_NOT_FOUND) + healthState.changeState(HealthDescription.DYNAMIC_CONFIGURATION_NOT_FOUND) } .subscribe(config::set) diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt index 87399caf..d58cc792 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt @@ -56,7 +56,7 @@ internal class ConsulConfigurationProvider(private val http: HttpAdapter, private val lastConfigurationHash: AtomicReference = AtomicReference(byteArrayOf()) private val retry = retrySpec.doOnRetry { logger.withWarn(ServiceContext::mdc) { log("Could not load fresh configuration", it.exception()) } - healthState.changeState(HealthDescription.RETRYING_FOR_CONSUL_CONFIGURATION) + healthState.changeState(HealthDescription.RETRYING_FOR_DYNAMIC_CONFIGURATION) } constructor(http: HttpAdapter, diff --git a/sources/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt b/sources/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt index a92d3763..ccae3c99 100644 --- a/sources/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt +++ b/sources/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt @@ -39,8 +39,6 @@ import reactor.core.publisher.Mono import reactor.retry.Retry import reactor.test.StepVerifier import java.time.Duration -import java.util.* -import kotlin.test.assertEquals /** * @author Jakub Dudycz @@ -108,7 +106,7 @@ internal object ConsulConfigurationProviderTest : Spek({ it("should update the health state") { StepVerifier.create(healthStateProvider().take(iterationCount)) .expectNextCount(iterationCount - 1) - .expectNext(HealthDescription.RETRYING_FOR_CONSUL_CONFIGURATION) + .expectNext(HealthDescription.RETRYING_FOR_DYNAMIC_CONFIGURATION) .verifyComplete() } } -- cgit 1.2.3-korg