diff options
author | Singal, Kapil (ks220y) <ks220y@att.com> | 2020-09-22 12:16:46 -0400 |
---|---|---|
committer | Singal, Kapil (ks220y) <ks220y@att.com> | 2020-09-22 13:49:05 -0400 |
commit | 1072867dfac0df993cbd3e44bcc11a5cac7465fd (patch) | |
tree | 4a821659cf3b50cf946cbb535d528be8508e9fff /ms/blueprintsprocessor/modules/commons/message-lib/src/test | |
parent | d97021cd756d63402545fdc2e14ac7611c3da118 (diff) |
Enabling Code Formatter
Code Formatter was turned off due to java 11 migation
Issue-ID: CCSDK-2852
Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Change-Id: I3d02ed3cc7a93d7551fe25356512cfe8db1517d8
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/message-lib/src/test')
5 files changed, 148 insertions, 128 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt index b1af230b9..b68678baf 100644 --- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt +++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt @@ -67,12 +67,12 @@ class MessagePropertiesDSLTest { assertNotNull(relationshipTypes, "failed to get relationship types") assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match") assertNotNull( - relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO], - "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}" + relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO], + "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}" ) assertNotNull( - relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER], - "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER}" + relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER], + "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER}" ) } diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt index 77bdbe408..a69f9f51a 100644 --- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt +++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt @@ -59,36 +59,39 @@ import kotlin.test.assertTrue @RunWith(SpringRunner::class) @DirtiesContext @ContextConfiguration( - classes = [BluePrintMessageLibConfiguration::class, - BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class] + classes = [ + BluePrintMessageLibConfiguration::class, + BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class + ] ) @TestPropertySource( properties = - ["blueprintsprocessor.messageconsumer.sample.type=kafka-scram-ssl-auth", - "blueprintsprocessor.messageconsumer.sample.bootstrapServers=127.0.0.1:9092", - "blueprintsprocessor.messageconsumer.sample.groupId=sample-group", - "blueprintsprocessor.messageconsumer.sample.topic=default-topic", - "blueprintsprocessor.messageconsumer.sample.clientId=default-client-id", - "blueprintsprocessor.messageconsumer.sample.pollMillSec=10", - "blueprintsprocessor.messageconsumer.sample.pollRecords=1", - "blueprintsprocessor.messageconsumer.sample.truststore=/path/to/truststore.jks", - "blueprintsprocessor.messageconsumer.sample.truststorePassword=secretpassword", - "blueprintsprocessor.messageconsumer.sample.keystore=/path/to/keystore.jks", - "blueprintsprocessor.messageconsumer.sample.keystorePassword=secretpassword", - "blueprintsprocessor.messageconsumer.sample.scramUsername=sample-user", - "blueprintsprocessor.messageconsumer.sample.scramPassword=secretpassword", + [ + "blueprintsprocessor.messageconsumer.sample.type=kafka-scram-ssl-auth", + "blueprintsprocessor.messageconsumer.sample.bootstrapServers=127.0.0.1:9092", + "blueprintsprocessor.messageconsumer.sample.groupId=sample-group", + "blueprintsprocessor.messageconsumer.sample.topic=default-topic", + "blueprintsprocessor.messageconsumer.sample.clientId=default-client-id", + "blueprintsprocessor.messageconsumer.sample.pollMillSec=10", + "blueprintsprocessor.messageconsumer.sample.pollRecords=1", + "blueprintsprocessor.messageconsumer.sample.truststore=/path/to/truststore.jks", + "blueprintsprocessor.messageconsumer.sample.truststorePassword=secretpassword", + "blueprintsprocessor.messageconsumer.sample.keystore=/path/to/keystore.jks", + "blueprintsprocessor.messageconsumer.sample.keystorePassword=secretpassword", + "blueprintsprocessor.messageconsumer.sample.scramUsername=sample-user", + "blueprintsprocessor.messageconsumer.sample.scramPassword=secretpassword", - "blueprintsprocessor.messageproducer.sample.type=kafka-scram-ssl-auth", - "blueprintsprocessor.messageproducer.sample.bootstrapServers=127.0.0.1:9092", - "blueprintsprocessor.messageproducer.sample.topic=default-topic", - "blueprintsprocessor.messageproducer.sample.clientId=default-client-id", - "blueprintsprocessor.messageproducer.sample.truststore=/path/to/truststore.jks", - "blueprintsprocessor.messageproducer.sample.truststorePassword=secretpassword", - "blueprintsprocessor.messageproducer.sample.keystore=/path/to/keystore.jks", - "blueprintsprocessor.messageproducer.sample.keystorePassword=secretpassword", - "blueprintsprocessor.messageproducer.sample.scramUsername=sample-user", - "blueprintsprocessor.messageproducer.sample.scramPassword=secretpassword" - ] + "blueprintsprocessor.messageproducer.sample.type=kafka-scram-ssl-auth", + "blueprintsprocessor.messageproducer.sample.bootstrapServers=127.0.0.1:9092", + "blueprintsprocessor.messageproducer.sample.topic=default-topic", + "blueprintsprocessor.messageproducer.sample.clientId=default-client-id", + "blueprintsprocessor.messageproducer.sample.truststore=/path/to/truststore.jks", + "blueprintsprocessor.messageproducer.sample.truststorePassword=secretpassword", + "blueprintsprocessor.messageproducer.sample.keystore=/path/to/keystore.jks", + "blueprintsprocessor.messageproducer.sample.keystorePassword=secretpassword", + "blueprintsprocessor.messageproducer.sample.scramUsername=sample-user", + "blueprintsprocessor.messageproducer.sample.scramPassword=secretpassword" + ] ) open class BlueprintMessageConsumerServiceTest { @@ -206,46 +209,52 @@ open class BlueprintMessageConsumerServiceTest { fun testKafkaScramSslAuthConfig() { val expectedConfig = mapOf<String, Any>( - ProducerConfig.BOOTSTRAP_SERVERS_CONFIG to "127.0.0.1:9092", - ConsumerConfig.GROUP_ID_CONFIG to "sample-group", - ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG to true, - ConsumerConfig.AUTO_OFFSET_RESET_CONFIG to "latest", - ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG to StringDeserializer::class.java, - ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG to ByteArrayDeserializer::class.java, - ConsumerConfig.CLIENT_ID_CONFIG to "default-client-id", - CommonClientConfigs.SECURITY_PROTOCOL_CONFIG to SecurityProtocol.SASL_SSL.toString(), - SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG to "JKS", - SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG to "/path/to/truststore.jks", - SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG to "secretpassword", - SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG to "/path/to/keystore.jks", - SslConfigs.SSL_KEYSTORE_TYPE_CONFIG to "JKS", - SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG to "secretpassword", - SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG to SslConfigs.DEFAULT_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM, - SaslConfigs.SASL_MECHANISM to "SCRAM-SHA-512", - SaslConfigs.SASL_JAAS_CONFIG to "${ScramLoginModule::class.java.canonicalName} required " + - "username=\"sample-user\" " + - "password=\"secretpassword\";" - ) + ProducerConfig.BOOTSTRAP_SERVERS_CONFIG to "127.0.0.1:9092", + ConsumerConfig.GROUP_ID_CONFIG to "sample-group", + ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG to true, + ConsumerConfig.AUTO_OFFSET_RESET_CONFIG to "latest", + ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG to StringDeserializer::class.java, + ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG to ByteArrayDeserializer::class.java, + ConsumerConfig.CLIENT_ID_CONFIG to "default-client-id", + CommonClientConfigs.SECURITY_PROTOCOL_CONFIG to SecurityProtocol.SASL_SSL.toString(), + SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG to "JKS", + SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG to "/path/to/truststore.jks", + SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG to "secretpassword", + SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG to "/path/to/keystore.jks", + SslConfigs.SSL_KEYSTORE_TYPE_CONFIG to "JKS", + SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG to "secretpassword", + SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG to SslConfigs.DEFAULT_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM, + SaslConfigs.SASL_MECHANISM to "SCRAM-SHA-512", + SaslConfigs.SASL_JAAS_CONFIG to "${ScramLoginModule::class.java.canonicalName} required " + + "username=\"sample-user\" " + + "password=\"secretpassword\";" + ) val messageConsumerProperties = bluePrintMessageLibPropertyService - .messageConsumerProperties("${MessageLibConstants.PROPERTY_MESSAGE_CONSUMER_PREFIX}sample") + .messageConsumerProperties("${MessageLibConstants.PROPERTY_MESSAGE_CONSUMER_PREFIX}sample") val configProps = messageConsumerProperties.getConfig() - assertEquals(messageConsumerProperties.topic, - "default-topic", - "Topic doesn't match the expected value" + assertEquals( + messageConsumerProperties.topic, + "default-topic", + "Topic doesn't match the expected value" + ) + assertEquals( + messageConsumerProperties.type, + "kafka-scram-ssl-auth", + "Authentication type doesn't match the expected value" ) - assertEquals(messageConsumerProperties.type, - "kafka-scram-ssl-auth", - "Authentication type doesn't match the expected value") expectedConfig.forEach { - assertTrue(configProps.containsKey(it.key), - "Missing expected kafka config key : ${it.key}") - assertEquals(configProps[it.key], - it.value, - "Unexpected value for ${it.key} got ${configProps[it.key]} instead of ${it.value}" + assertTrue( + configProps.containsKey(it.key), + "Missing expected kafka config key : ${it.key}" + ) + assertEquals( + configProps[it.key], + it.value, + "Unexpected value for ${it.key} got ${configProps[it.key]} instead of ${it.value}" ) } } diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt index 881f0b422..f88caa173 100644 --- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt +++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt @@ -49,22 +49,25 @@ import kotlin.test.assertTrue @RunWith(SpringRunner::class) @DirtiesContext @ContextConfiguration( - classes = [BluePrintMessageLibConfiguration::class, - BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class] + classes = [ + BluePrintMessageLibConfiguration::class, + BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class + ] ) @TestPropertySource( properties = - ["blueprintsprocessor.messageproducer.sample.type=kafka-scram-ssl-auth", - "blueprintsprocessor.messageproducer.sample.bootstrapServers=127.0.0.1:9092", - "blueprintsprocessor.messageproducer.sample.topic=default-topic", - "blueprintsprocessor.messageproducer.sample.clientId=default-client-id", - "blueprintsprocessor.messageproducer.sample.truststore=/path/to/truststore.jks", - "blueprintsprocessor.messageproducer.sample.truststorePassword=secretpassword", - "blueprintsprocessor.messageproducer.sample.keystore=/path/to/keystore.jks", - "blueprintsprocessor.messageproducer.sample.keystorePassword=secretpassword", - "blueprintsprocessor.messageproducer.sample.scramUsername=sample-user", - "blueprintsprocessor.messageproducer.sample.scramPassword=secretpassword" - ] + [ + "blueprintsprocessor.messageproducer.sample.type=kafka-scram-ssl-auth", + "blueprintsprocessor.messageproducer.sample.bootstrapServers=127.0.0.1:9092", + "blueprintsprocessor.messageproducer.sample.topic=default-topic", + "blueprintsprocessor.messageproducer.sample.clientId=default-client-id", + "blueprintsprocessor.messageproducer.sample.truststore=/path/to/truststore.jks", + "blueprintsprocessor.messageproducer.sample.truststorePassword=secretpassword", + "blueprintsprocessor.messageproducer.sample.keystore=/path/to/keystore.jks", + "blueprintsprocessor.messageproducer.sample.keystorePassword=secretpassword", + "blueprintsprocessor.messageproducer.sample.scramUsername=sample-user", + "blueprintsprocessor.messageproducer.sample.scramPassword=secretpassword" + ] ) open class BlueprintMessageProducerServiceTest { @@ -96,48 +99,53 @@ open class BlueprintMessageProducerServiceTest { @Test fun testKafkaScramSslAuthConfig() { val expectedConfig = mapOf<String, Any>( - ProducerConfig.BOOTSTRAP_SERVERS_CONFIG to "127.0.0.1:9092", - ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG to StringSerializer::class.java, - ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG to ByteArraySerializer::class.java, - ProducerConfig.ACKS_CONFIG to "all", - ProducerConfig.MAX_BLOCK_MS_CONFIG to 250, - ProducerConfig.RECONNECT_BACKOFF_MS_CONFIG to 60 * 60 * 1000, - ProducerConfig.ENABLE_IDEMPOTENCE_CONFIG to true, - ConsumerConfig.CLIENT_ID_CONFIG to "default-client-id", - CommonClientConfigs.SECURITY_PROTOCOL_CONFIG to SecurityProtocol.SASL_SSL.toString(), - SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG to "JKS", - SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG to "/path/to/truststore.jks", - SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG to "secretpassword", - SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG to "/path/to/keystore.jks", - SslConfigs.SSL_KEYSTORE_TYPE_CONFIG to "JKS", - SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG to "secretpassword", - SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG to SslConfigs.DEFAULT_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM, - SaslConfigs.SASL_MECHANISM to "SCRAM-SHA-512", - SaslConfigs.SASL_JAAS_CONFIG to "${ScramLoginModule::class.java.canonicalName} required " + - "username=\"sample-user\" " + - "password=\"secretpassword\";" + ProducerConfig.BOOTSTRAP_SERVERS_CONFIG to "127.0.0.1:9092", + ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG to StringSerializer::class.java, + ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG to ByteArraySerializer::class.java, + ProducerConfig.ACKS_CONFIG to "all", + ProducerConfig.MAX_BLOCK_MS_CONFIG to 250, + ProducerConfig.RECONNECT_BACKOFF_MS_CONFIG to 60 * 60 * 1000, + ProducerConfig.ENABLE_IDEMPOTENCE_CONFIG to true, + ConsumerConfig.CLIENT_ID_CONFIG to "default-client-id", + CommonClientConfigs.SECURITY_PROTOCOL_CONFIG to SecurityProtocol.SASL_SSL.toString(), + SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG to "JKS", + SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG to "/path/to/truststore.jks", + SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG to "secretpassword", + SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG to "/path/to/keystore.jks", + SslConfigs.SSL_KEYSTORE_TYPE_CONFIG to "JKS", + SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG to "secretpassword", + SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG to SslConfigs.DEFAULT_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM, + SaslConfigs.SASL_MECHANISM to "SCRAM-SHA-512", + SaslConfigs.SASL_JAAS_CONFIG to "${ScramLoginModule::class.java.canonicalName} required " + + "username=\"sample-user\" " + + "password=\"secretpassword\";" ) val messageProducerProperties = bluePrintMessageLibPropertyService - .messageProducerProperties("${MessageLibConstants.PROPERTY_MESSAGE_PRODUCER_PREFIX}sample") + .messageProducerProperties("${MessageLibConstants.PROPERTY_MESSAGE_PRODUCER_PREFIX}sample") val configProps = messageProducerProperties.getConfig() - assertEquals(messageProducerProperties.topic, - "default-topic", - "Topic doesn't match the expected value" + assertEquals( + messageProducerProperties.topic, + "default-topic", + "Topic doesn't match the expected value" + ) + assertEquals( + messageProducerProperties.type, + "kafka-scram-ssl-auth", + "Authentication type doesn't match the expected value" ) - assertEquals(messageProducerProperties.type, - "kafka-scram-ssl-auth", - "Authentication type doesn't match the expected value") expectedConfig.forEach { - assertTrue(configProps.containsKey(it.key), - "Missing expected kafka config key : ${it.key}" + assertTrue( + configProps.containsKey(it.key), + "Missing expected kafka config key : ${it.key}" ) - assertEquals(configProps[it.key], - it.value, - "Unexpected value for ${it.key} got ${configProps[it.key]} instead of ${it.value}" + assertEquals( + configProps[it.key], + it.value, + "Unexpected value for ${it.key} got ${configProps[it.key]} instead of ${it.value}" ) } } diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt index 44990ae7f..f488a4c74 100644 --- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt +++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt @@ -41,31 +41,33 @@ import kotlin.test.assertNotNull @RunWith(SpringRunner::class) @DirtiesContext @ContextConfiguration( - classes = [BluePrintMessageLibConfiguration::class, - BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class] + classes = [ + BluePrintMessageLibConfiguration::class, + BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class + ] ) @TestPropertySource( properties = - [ - "blueprintsprocessor.messageproducer.sample.type=kafka-scram-ssl-auth", - "blueprintsprocessor.messageproducer.sample.bootstrapServers=127.0.0.1:9092", - "blueprintsprocessor.messageproducer.sample.topic=default-stream-topic", - "blueprintsprocessor.messageproducer.sample.clientId=default-client-id", - "blueprintsprocessor.messageproducer.sample.truststore=/path/to/truststore.jks", - "blueprintsprocessor.messageproducer.sample.truststorePassword=secretpassword", - "blueprintsprocessor.messageproducer.sample.scramUsername=sample-user", - "blueprintsprocessor.messageproducer.sample.scramPassword=secretpassword", + [ + "blueprintsprocessor.messageproducer.sample.type=kafka-scram-ssl-auth", + "blueprintsprocessor.messageproducer.sample.bootstrapServers=127.0.0.1:9092", + "blueprintsprocessor.messageproducer.sample.topic=default-stream-topic", + "blueprintsprocessor.messageproducer.sample.clientId=default-client-id", + "blueprintsprocessor.messageproducer.sample.truststore=/path/to/truststore.jks", + "blueprintsprocessor.messageproducer.sample.truststorePassword=secretpassword", + "blueprintsprocessor.messageproducer.sample.scramUsername=sample-user", + "blueprintsprocessor.messageproducer.sample.scramPassword=secretpassword", - "blueprintsprocessor.messageconsumer.stream-consumer.type=kafka-streams-scram-ssl-auth", - "blueprintsprocessor.messageconsumer.stream-consumer.bootstrapServers=127.0.0.1:9092", - "blueprintsprocessor.messageconsumer.stream-consumer.applicationId=test-streams-application", - "blueprintsprocessor.messageconsumer.stream-consumer.topic=default-stream-topic", - "blueprintsprocessor.messageproducer.stream-consumer.truststore=/path/to/truststore.jks", - "blueprintsprocessor.messageproducer.stream-consumer.truststorePassword=secretpassword", - "blueprintsprocessor.messageproducer.stream-consumer.scramUsername=sample-user", - "blueprintsprocessor.messageproducer.stream-consumer.scramPassword=secretpassword" + "blueprintsprocessor.messageconsumer.stream-consumer.type=kafka-streams-scram-ssl-auth", + "blueprintsprocessor.messageconsumer.stream-consumer.bootstrapServers=127.0.0.1:9092", + "blueprintsprocessor.messageconsumer.stream-consumer.applicationId=test-streams-application", + "blueprintsprocessor.messageconsumer.stream-consumer.topic=default-stream-topic", + "blueprintsprocessor.messageproducer.stream-consumer.truststore=/path/to/truststore.jks", + "blueprintsprocessor.messageproducer.stream-consumer.truststorePassword=secretpassword", + "blueprintsprocessor.messageproducer.stream-consumer.scramUsername=sample-user", + "blueprintsprocessor.messageproducer.stream-consumer.scramPassword=secretpassword" - ] + ] ) class KafkaStreamsConsumerServiceTest { @@ -92,7 +94,7 @@ class KafkaStreamsConsumerServiceTest { ): Topology { val topology = Topology() val kafkaStreamsBasicAuthConsumerProperties = messageConsumerProperties - as KafkaStreamsBasicAuthConsumerProperties + as KafkaStreamsBasicAuthConsumerProperties val topics = kafkaStreamsBasicAuthConsumerProperties.topic.split(",") topology.addSource("Source", *topics.toTypedArray()) diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt index 5d77c3746..aa38b6e5c 100644 --- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt +++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt @@ -31,6 +31,7 @@ import java.nio.charset.Charset import java.util.UUID class PriorityMessage : Serializable { + lateinit var id: String lateinit var requestMessage: String } |