diff options
author | Piotr Jaszczyk <piotr.jaszczyk@nokia.com> | 2018-12-18 15:58:56 +0100 |
---|---|---|
committer | Piotr Jaszczyk <piotr.jaszczyk@nokia.com> | 2018-12-20 14:57:25 +0100 |
commit | 4128aa2c9368ed20fab92e8c0df83f14d6233b86 (patch) | |
tree | cff4cf2428a288b7b86830f282b81d41a41ad250 /sources/hv-collector-main/src/test | |
parent | 4ab95420e42f6df59bd4851eee41be6579bdbbe1 (diff) |
There should be one KafkaSender per configuration
We should keep only one instance of KafkaSender per instance. However,
as the configuration might be changed (Consul update) it cannot be a
strict singleton. Hence there should be 1to1 relationship beetween
ConsulConfiguration and KafkaSender.
Change-Id: Ie168028c4427741254b8c2fe316b82cca72d7668
Issue-ID: DCAEGEN2-1047
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Diffstat (limited to 'sources/hv-collector-main/src/test')
-rw-r--r-- | sources/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgVesHvConfigurationTest.kt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgVesHvConfigurationTest.kt b/sources/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgVesHvConfigurationTest.kt index 1aac6a09..9dddeca9 100644 --- a/sources/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgVesHvConfigurationTest.kt +++ b/sources/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgVesHvConfigurationTest.kt @@ -39,6 +39,7 @@ import kotlin.test.assertNotNull */ object ArgVesHvConfigurationTest : Spek({ lateinit var cut: ArgVesHvConfiguration + val kafkaBootstrapServers = "dmaap-mr-wro:6666,dmaap-mr-gda:6666" val healthCheckApiPort = "6070" val configurationUrl = "http://test-address/test" val firstRequestDelay = "10" @@ -57,6 +58,7 @@ object ArgVesHvConfigurationTest : Spek({ beforeEachTest { result = cut.parseExpectingSuccess( + "--kafka-bootstrap-servers", kafkaBootstrapServers, "--health-check-api-port", healthCheckApiPort, "--listen-port", listenPort, "--config-url", configurationUrl, @@ -69,6 +71,10 @@ object ArgVesHvConfigurationTest : Spek({ ) } + it("should set proper kafka bootstrap servers") { + assertThat(result.kafkaConfiguration.bootstrapServers).isEqualTo(kafkaBootstrapServers) + } + it("should set proper listen port") { assertThat(result.serverListenAddress.port).isEqualTo(listenPort.toInt()) } |