From 36128a2e16e5eac1dd47ff36e2e2d4d17586e60f Mon Sep 17 00:00:00 2001 From: Frank Kimmlingen Date: Tue, 7 Mar 2023 16:36:48 +0100 Subject: Enable JUnit tests JUnit tests are no more executed: spring-boot-starter-test does not execute any junit4 tests by default Issue-ID: CCSDK-3859 Signed-off-by: Frank Kimmlingen Signed-off-by: Lukasz Rajewski Change-Id: I02a8d25350ca62262bfc6e07c2865cd8d7b4e6b2 --- .../MessagePrioritizationConsumerTest.kt | 35 ---------------------- 1 file changed, 35 deletions(-) (limited to 'ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin') 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 @@ -180,37 +176,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 { -- cgit 1.2.3-korg