From c628217048b06eb91359aa6cf4758e6de05425a7 Mon Sep 17 00:00:00 2001 From: mpriyank Date: Thu, 30 Jan 2025 16:37:18 +0000 Subject: Fix deprecation issue related to KafkaContainer - Replaced KafkaContainer with ConfluentKafkaContainer to fix the deprecation issue - Bumped the version of cp-kafka and cp-zookeeper to 7.8.0 - Removing reference of registry.nordix as the NCMP internal pipeline is no longer used Issue-ID: CPS-2608 Change-Id: Ic1f3edbc06d63c5f00c1ecb901e07a6bc17ae6eb Signed-off-by: mpriyank --- .../groovy/org/onap/cps/ncmp/utils/events/MessagingBaseSpec.groovy | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cps-ncmp-service') diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/utils/events/MessagingBaseSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/utils/events/MessagingBaseSpec.groovy index 377a1a6637..d38d5442f2 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/utils/events/MessagingBaseSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/utils/events/MessagingBaseSpec.groovy @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (c) 2023 Nordix Foundation. + * Copyright (c) 2023-2025 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,8 +29,7 @@ import org.springframework.kafka.core.KafkaTemplate import org.springframework.kafka.support.serializer.JsonSerializer import org.springframework.test.context.DynamicPropertyRegistry import org.springframework.test.context.DynamicPropertySource -import org.testcontainers.containers.KafkaContainer -import org.testcontainers.utility.DockerImageName +import org.testcontainers.kafka.ConfluentKafkaContainer import spock.lang.Specification class MessagingBaseSpec extends Specification { @@ -43,7 +42,7 @@ class MessagingBaseSpec extends Specification { kafkaTestContainer.stop() } - static kafkaTestContainer = new KafkaContainer(DockerImageName.parse('registry.nordix.org/onaptest/confluentinc/cp-kafka:6.2.1').asCompatibleSubstituteFor('confluentinc/cp-kafka')) + static kafkaTestContainer = new ConfluentKafkaContainer("confluentinc/cp-kafka:7.8.0") def legacyEventKafkaTemplate = new KafkaTemplate<>(new DefaultKafkaProducerFactory(eventProducerConfigProperties(JsonSerializer))) -- cgit