aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-dcae-app-simulator/src/main
diff options
context:
space:
mode:
authorfkrzywka <filip.krzywka@nokia.com>2018-07-16 08:17:29 +0200
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2018-08-03 07:09:48 +0200
commit2a8d4e37f01386c59379b9f974dddbf595ee0a18 (patch)
tree4c9d4170cb79fabd466cbf0c88fab3be3f46eebb /hv-collector-dcae-app-simulator/src/main
parentc494575919fe88a050644766b152327bd433eaa6 (diff)
Include msg generator module in coverage report
* Reordered alphabetically modules in main pom file * Removed unused imports * Corrected visibility for fields/methods * Fix typos in tests Change-Id: I35c515b3844bc8517cc6ffb0c6557596505536c9 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
Diffstat (limited to 'hv-collector-dcae-app-simulator/src/main')
-rw-r--r--hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/kafka/consumer.kt2
-rw-r--r--hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/remote/ApiServer.kt2
2 files changed, 2 insertions, 2 deletions
diff --git a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/kafka/consumer.kt b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/kafka/consumer.kt
index 7db69205..869c5ab6 100644
--- a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/kafka/consumer.kt
+++ b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/kafka/consumer.kt
@@ -67,7 +67,7 @@ class Consumer : ConsumerStateProvider {
}
}
-class ConsumerFactory(val kafkaBootstrapServers: String) {
+class ConsumerFactory(private val kafkaBootstrapServers: String) {
fun createConsumerForTopics(kafkaTopics: Set<String>): ConsumerStateProvider {
return KafkaSource.create(kafkaBootstrapServers, kafkaTopics.toSet()).start().unsafeRunSync()
}
diff --git a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/remote/ApiServer.kt b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/remote/ApiServer.kt
index 39b4fe2f..d1d90b00 100644
--- a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/remote/ApiServer.kt
+++ b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/remote/ApiServer.kt
@@ -54,7 +54,7 @@ class ApiServer(private val consumerFactory: ConsumerFactory) {
chain
.put("configuration/topics") { ctx ->
ctx.request.body.then { it ->
- val topics = extractTopics(it.getText())
+ val topics = extractTopics(it.text)
logger.info("Received new configuration. Creating consumer for topics: $topics")
consumerState = consumerFactory.createConsumerForTopics(topics)
ctx.response.contentType(CONTENT_TEXT)