JAVA-25374: Fixes made for integration test failure in spring-kafka-2… (#14864)

This commit is contained in:
Bipin kumar 2023-10-16 15:16:22 +05:30 committed by GitHub
parent 0eafba3ba1
commit b0dc3b228a
5 changed files with 8 additions and 4 deletions

View File

@ -942,6 +942,7 @@
<module>gradle-modules/gradle/maven-to-gradle</module>
<module>persistence-modules/spring-data-neo4j</module>
<module>parent-boot-3</module>
<module>spring-kafka-2</module>
<!--<module>java-panama</module> Java-19 module-->
</modules>
@ -1225,6 +1226,9 @@
<module>gradle-modules/gradle/maven-to-gradle</module>
<module>persistence-modules/spring-data-neo4j</module>
<module>spring-actuator</module>
<module>spring-cloud-modules/spring-cloud-contract</module>
<module>spring-kafka-2</module>
<!--<module>java-panama</module> Java-19 module-->
</modules>
<properties>

View File

@ -1,4 +1,4 @@
spring.kafka.bootstrap-servers=localhost:9092
spring.kafka.bootstrap-servers=localhost:9092,localhost:9093,localhost:9094
message.topic.name=baeldung
long.message.topic.name=longMessage
greeting.topic.name=greeting

View File

@ -19,7 +19,7 @@ import org.springframework.kafka.listener.ConcurrentMessageListenerContainer;
import org.springframework.kafka.test.context.EmbeddedKafka;
@SpringBootTest(classes = MultipleListenersApplicationKafkaApp.class)
@EmbeddedKafka(partitions = 1, brokerProperties = { "listeners=PLAINTEXT://localhost:9092", "port=9092" })
@EmbeddedKafka(partitions = 1, controlledShutdown = true, brokerProperties = { "listeners=PLAINTEXT://localhost:9092", "port=9092" })
class KafkaMultipleListenersIntegrationTest {
@Autowired

View File

@ -22,7 +22,7 @@ import com.baeldung.spring.kafka.retryable.RetryableApplicationKafkaApp;
import com.fasterxml.jackson.databind.ObjectMapper;
@SpringBootTest(classes = RetryableApplicationKafkaApp.class)
@EmbeddedKafka(partitions = 1, brokerProperties = { "listeners=PLAINTEXT://localhost:9092", "port=9092" })
@EmbeddedKafka(partitions = 1, controlledShutdown = true, brokerProperties = { "listeners=PLAINTEXT://localhost:9093", "port=9093" })
public class KafkaRetryableIntegrationTest {
@ClassRule
public static EmbeddedKafkaBroker embeddedKafka = new EmbeddedKafkaBroker(1, true, "multitype");

View File

@ -8,7 +8,7 @@ import org.springframework.kafka.test.EmbeddedKafkaBroker;
import org.springframework.kafka.test.context.EmbeddedKafka;
@SpringBootTest(classes = ThermostatApplicationKafkaApp.class)
@EmbeddedKafka(partitions = 2, brokerProperties = {"listeners=PLAINTEXT://localhost:9092", "port=9092"})
@EmbeddedKafka(partitions = 2, controlledShutdown = true, brokerProperties = {"listeners=PLAINTEXT://localhost:9094", "port=9094"})
public class KafkaTopicsAndPartitionsIntegrationTest {
@ClassRule
public static EmbeddedKafkaBroker embeddedKafka = new EmbeddedKafkaBroker(1, true, "multitype");