Updated versions and re-enabled kafka test
This commit is contained in:
@@ -10,11 +10,9 @@
|
||||
<artifactId>spring-cloud-starter-single-step-batch-job</artifactId>
|
||||
|
||||
<properties>
|
||||
<test.containers.version>1.15.3</test.containers.version>
|
||||
<test.rabbit.containers.version>1.15.3</test.rabbit.containers.version>
|
||||
<test.containers.version>1.16.0</test.containers.version>
|
||||
<test.rabbit.containers.version>1.16.0</test.rabbit.containers.version>
|
||||
<test.ducttape.version>1.0.8</test.ducttape.version>
|
||||
<spring-kafka-version>2.8.0-RC1</spring-kafka-version>
|
||||
<spring-cloud-stream.version>3.2.0-SNAPSHOT</spring-cloud-stream.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -83,11 +81,6 @@
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream-binder-kafka</artifactId>
|
||||
<version>${spring-cloud-stream.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
@@ -106,13 +99,11 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.kafka</groupId>
|
||||
<artifactId>spring-kafka-test</artifactId>
|
||||
<version>${spring-kafka-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.kafka</groupId>
|
||||
<artifactId>spring-kafka</artifactId>
|
||||
<version>${spring-kafka-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
|
||||
@@ -26,6 +26,8 @@ import org.apache.kafka.clients.admin.NewTopic;
|
||||
import org.apache.kafka.clients.producer.Producer;
|
||||
import org.apache.kafka.clients.producer.ProducerRecord;
|
||||
import org.apache.kafka.common.serialization.StringSerializer;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
@@ -45,16 +47,17 @@ import org.springframework.kafka.core.DefaultKafkaProducerFactory;
|
||||
import org.springframework.kafka.support.serializer.JsonDeserializer;
|
||||
import org.springframework.kafka.support.serializer.JsonSerializer;
|
||||
import org.springframework.kafka.test.EmbeddedKafkaBroker;
|
||||
import org.springframework.kafka.test.context.EmbeddedKafka;
|
||||
import org.springframework.kafka.test.utils.KafkaTestUtils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
//@EmbeddedKafka(partitions = 1, topics = { "test" })
|
||||
@EmbeddedKafka(partitions = 1, topics = { "test" })
|
||||
public class KafkaItemReaderAutoConfigurationTests {
|
||||
|
||||
private static EmbeddedKafkaBroker embeddedKafkaBroker;
|
||||
|
||||
// @BeforeAll
|
||||
@BeforeAll
|
||||
public static void setupTest(EmbeddedKafkaBroker embeddedKafka) {
|
||||
embeddedKafkaBroker = embeddedKafka;
|
||||
embeddedKafka.addTopics(new NewTopic("topic1", 1, (short) 1),
|
||||
@@ -62,7 +65,7 @@ public class KafkaItemReaderAutoConfigurationTests {
|
||||
new NewTopic("topic3", 1, (short) 1));
|
||||
}
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
public void testBaseKafkaItemReader() {
|
||||
final String topicName = "topic1";
|
||||
populateSingleTopic(topicName);
|
||||
@@ -109,7 +112,7 @@ public class KafkaItemReaderAutoConfigurationTests {
|
||||
});
|
||||
}
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
public void testBaseKafkaItemReaderMultiplePartitions() {
|
||||
final String topicName = "topic2";
|
||||
populateSingleTopic(topicName);
|
||||
@@ -151,7 +154,7 @@ public class KafkaItemReaderAutoConfigurationTests {
|
||||
});
|
||||
}
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
public void testBaseKafkaItemReaderPollTimeoutDefault() {
|
||||
final String topicName = "topic3";
|
||||
populateSingleTopic(topicName);
|
||||
|
||||
@@ -24,6 +24,8 @@ import java.util.Map;
|
||||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.apache.kafka.clients.consumer.ConsumerRecords;
|
||||
import org.apache.kafka.common.serialization.StringDeserializer;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
@@ -43,23 +45,24 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.kafka.core.DefaultKafkaConsumerFactory;
|
||||
import org.springframework.kafka.support.serializer.JsonDeserializer;
|
||||
import org.springframework.kafka.test.EmbeddedKafkaBroker;
|
||||
import org.springframework.kafka.test.context.EmbeddedKafka;
|
||||
import org.springframework.kafka.test.utils.KafkaTestUtils;
|
||||
|
||||
import static java.util.Collections.singleton;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
// @EmbeddedKafka(partitions = 1, topics = { "topic1" })
|
||||
@EmbeddedKafka(partitions = 1, topics = { "topic1" })
|
||||
public class KafkaItemWriterTests {
|
||||
|
||||
private static EmbeddedKafkaBroker embeddedKafkaBroker;
|
||||
|
||||
// @BeforeAll
|
||||
@BeforeAll
|
||||
public static void setupTest(EmbeddedKafkaBroker embeddedKafka) {
|
||||
embeddedKafkaBroker = embeddedKafka;
|
||||
embeddedKafka.addTopics("topic2");
|
||||
}
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
public void testBaseKafkaItemWriter() {
|
||||
final String topicName = "topic1";
|
||||
ApplicationContextRunner applicationContextRunner = new ApplicationContextRunner()
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<artifactId>spring-cloud-task-integration-tests</artifactId>
|
||||
|
||||
<properties>
|
||||
<test.containers.version>1.15.3</test.containers.version>
|
||||
<test.rabbit.containers.version>1.15.3</test.rabbit.containers.version>
|
||||
<test.containers.version>1.16.0</test.containers.version>
|
||||
<test.rabbit.containers.version>1.16.0</test.rabbit.containers.version>
|
||||
<test.ducttape.version>1.0.8</test.ducttape.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<test.containers.version>1.15.3</test.containers.version>
|
||||
<test.rabbit.containers.version>1.15.3</test.rabbit.containers.version>
|
||||
<test.containers.version>1.16.0</test.containers.version>
|
||||
<test.rabbit.containers.version>1.16.0</test.rabbit.containers.version>
|
||||
<test.ducttape.version>1.0.8</test.ducttape.version>
|
||||
<spring.cloud.stream>3.2.0-SNAPSHOT</spring.cloud.stream>
|
||||
</properties>
|
||||
|
||||
Reference in New Issue
Block a user