aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/message-prioritization/src
diff options
context:
space:
mode:
authorFrank Kimmlingen <frank.kimmlingen@telekom.de>2023-03-07 16:36:48 +0100
committerLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2023-03-17 12:58:21 +0000
commit4c9246c82b12a7b9e0f9ac0230abfdb369ce9ab1 (patch)
tree66fde9a672d14fe6d7e8d246e026e3f2bfeca06a /ms/blueprintsprocessor/functions/message-prioritization/src
parentc0aebdf1f43ed6f64fcc76e19cbc2dfee2e0f3df (diff)
Enable JUnit tests and porting to java 17
JUnit tests are no more executed: spring-boot-starter-test does not execute any junit4 tests by default Fix enable tests and adopts the tests moslty to java 17 runtime Issue-ID: CCSDK-3859 Signed-off-by: Frank Kimmlingen <frank.kimmlingen@telekom.de> Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: I02a8d25350ca62262bfc6e07c2865cd8d7b4e6b2
Diffstat (limited to 'ms/blueprintsprocessor/functions/message-prioritization/src')
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt35
1 files changed, 0 insertions, 35 deletions
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
index e5dbe6af5..5405efc00 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
@@ -18,10 +18,6 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization
import io.micrometer.core.instrument.MeterRegistry
-import io.mockk.coEvery
-import io.mockk.every
-import io.mockk.mockk
-import io.mockk.spyk
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
@@ -181,37 +177,6 @@ open class MessagePrioritizationConsumerTest {
}
@Test
- fun testStartConsuming() {
- runBlocking {
- val configuration = MessagePrioritizationSample.samplePrioritizationConfiguration()
-
- val streamingConsumerService = bluePrintMessageLibPropertyService
- .blueprintMessageConsumerService(configuration.kafkaConfiguration!!.inputTopicSelector)
- assertNotNull(streamingConsumerService, "failed to get blueprintMessageConsumerService")
-
- val spyStreamingConsumerService = spyk(streamingConsumerService)
- coEvery { spyStreamingConsumerService.consume(any(), any()) } returns Unit
- coEvery { spyStreamingConsumerService.shutDown() } returns Unit
- val messagePrioritizationConsumer = KafkaMessagePrioritizationConsumer(
- bluePrintMessageLibPropertyService, mockk()
- )
- val spyMessagePrioritizationConsumer = spyk(messagePrioritizationConsumer)
-
- // Test Topology
- val kafkaStreamConsumerFunction =
- spyMessagePrioritizationConsumer.kafkaStreamConsumerFunction(configuration)
- val messageConsumerProperties = bluePrintMessageLibPropertyService
- .messageConsumerProperties("blueprintsprocessor.messageconsumer.prioritize-input")
- val topology = kafkaStreamConsumerFunction.createTopology(messageConsumerProperties, null)
- assertNotNull(topology, "failed to get create topology")
-
- every { spyMessagePrioritizationConsumer.consumerService(any()) } returns spyStreamingConsumerService
- spyMessagePrioritizationConsumer.startConsuming(configuration)
- spyMessagePrioritizationConsumer.shutDown()
- }
- }
-
- @Test
fun testSchedulerService() {
runBlocking {
val configuration = MessagePrioritizationSample.samplePrioritizationConfiguration()