From 7ade810d7697a53d9602f1b58dd06d0ae92f0fd0 Mon Sep 17 00:00:00 2001 From: s9m33r Date: Sun, 25 Feb 2024 15:27:47 +0530 Subject: [PATCH] BAEL-7351 test configuration --- .../java/com/baeldung/spring/kafka/groupId/MainLiveTest.java | 2 ++ .../src/test/resources/application-groupId.properties | 1 + 2 files changed, 3 insertions(+) create mode 100644 spring-kafka-3/src/test/resources/application-groupId.properties diff --git a/spring-kafka-3/src/test/java/com/baeldung/spring/kafka/groupId/MainLiveTest.java b/spring-kafka-3/src/test/java/com/baeldung/spring/kafka/groupId/MainLiveTest.java index 338ed2855f..2c48d25ca2 100644 --- a/spring-kafka-3/src/test/java/com/baeldung/spring/kafka/groupId/MainLiveTest.java +++ b/spring-kafka-3/src/test/java/com/baeldung/spring/kafka/groupId/MainLiveTest.java @@ -13,8 +13,10 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.ComponentScan; import org.springframework.kafka.test.context.EmbeddedKafka; import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ActiveProfiles; @SpringBootTest(classes = Main.class) +@ActiveProfiles("groupId") @ComponentScan(basePackages = "com.baeldung.spring.kafka.groupId") @DirtiesContext @EmbeddedKafka(partitions = 4, topics = { "${kafka.topic.name:test-topic}" }, brokerProperties = { "listeners=PLAINTEXT://localhost:8000", "port=8000" }) diff --git a/spring-kafka-3/src/test/resources/application-groupId.properties b/spring-kafka-3/src/test/resources/application-groupId.properties new file mode 100644 index 0000000000..648ae1b603 --- /dev/null +++ b/spring-kafka-3/src/test/resources/application-groupId.properties @@ -0,0 +1 @@ +spring.kafka.bootstrap-servers=localhost:8000