Updated base project to 3.x
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-task-parent</artifactId>
|
||||
<version>2.4.1-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-task-docs</artifactId>
|
||||
<name>Spring Cloud Task Docs</name>
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -11,7 +11,7 @@
|
||||
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-task-parent</artifactId>
|
||||
<version>2.4.1-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Spring Cloud Task Build</name>
|
||||
<description>Spring Cloud Task Build</description>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-task-parent</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>2.4.1-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-task-parent</artifactId>
|
||||
<version>2.4.1-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>spring-cloud-starter-task</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-task-parent</artifactId>
|
||||
<version>2.4.1-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>spring-cloud-task-batch</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-task-parent</artifactId>
|
||||
<version>2.4.1-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>spring-cloud-task-core</artifactId>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>spring-cloud-task-dependencies</artifactId>
|
||||
<version>2.4.1-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Spring Cloud Task Dependencies</name>
|
||||
<description>Spring Cloud Task Dependencies</description>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-task-parent</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>2.4.1-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>Spring Cloud Task Integration Tests</name>
|
||||
|
||||
@@ -130,7 +130,7 @@ public class BatchExecutionEventTests {
|
||||
"--spring.cloud.task.batch.events.itemProcessEventBindingName=" + bindingName,
|
||||
bindingName, 1);
|
||||
String value = new String(result.get(0).getPayload());
|
||||
assertThat(value).isEqualTo("\"item did not equal result after processing\"");
|
||||
assertThat(value).isEqualTo("item did not equal result after processing");
|
||||
|
||||
}
|
||||
|
||||
@@ -142,9 +142,9 @@ public class BatchExecutionEventTests {
|
||||
"--spring.cloud.task.batch.events.chunkEventBindingName=" + bindingName,
|
||||
bindingName, 2);
|
||||
String value = new String(result.get(0).getPayload());
|
||||
assertThat(value).isEqualTo("\"Before Chunk Processing\"");
|
||||
assertThat(value).isEqualTo("Before Chunk Processing");
|
||||
value = new String(result.get(1).getPayload());
|
||||
assertThat(value).isEqualTo("\"After Chunk Processing\"");
|
||||
assertThat(value).isEqualTo("After Chunk Processing");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -155,9 +155,9 @@ public class BatchExecutionEventTests {
|
||||
"--spring.cloud.task.batch.events.itemWriteEventBindingName=" + bindingName,
|
||||
bindingName, 2);
|
||||
String value = new String(result.get(0).getPayload());
|
||||
assertThat(value).isEqualTo("\"3 items to be written.\"");
|
||||
assertThat(value).isEqualTo("3 items to be written.");
|
||||
value = new String(result.get(1).getPayload());
|
||||
assertThat(value).isEqualTo("\"3 items have been written.\"");
|
||||
assertThat(value).isEqualTo("3 items have been written.");
|
||||
}
|
||||
|
||||
private String[] getCommandLineParams(String sinkChannelParam) {
|
||||
@@ -210,14 +210,14 @@ public class BatchExecutionEventTests {
|
||||
"--spring.cloud.task.batch.events.itemReadEventBindingName=" + bindingName,
|
||||
bindingName, 1);
|
||||
String exceptionMessage = new String(result.get(0).getPayload());
|
||||
assertThat(exceptionMessage).isEqualTo("\"Exception while item was being read\"");
|
||||
assertThat(exceptionMessage).isEqualTo("Exception while item was being read");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSkipEventListener() {
|
||||
final String SKIPPING_READ_MESSAGE = "\"Skipped when reading.\"";
|
||||
final String SKIPPING_READ_MESSAGE = "Skipped when reading.";
|
||||
|
||||
final String SKIPPING_WRITE_CONTENT = "\"-1\"";
|
||||
final String SKIPPING_WRITE_CONTENT = "-1";
|
||||
final String bindingName = "skip-event-foobar";
|
||||
List<Message<byte[]>> result = testListenerSkip(
|
||||
"--spring.cloud.task.batch.events.skipEventBindingName=" + bindingName,
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<test.rabbit.containers.version>1.16.1</test.rabbit.containers.version>
|
||||
<test.ducttape.version>1.0.8</test.ducttape.version>
|
||||
<spring.cloud.stream>3.2.0-SNAPSHOT</spring.cloud.stream>
|
||||
<spring.cloud.task>3.0.0-SNAPSHOT</spring.cloud.task>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
@@ -42,6 +43,13 @@
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-task-dependencies</artifactId>
|
||||
<version>${spring.cloud.task}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-task-parent</artifactId>
|
||||
<version>2.4.1-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>io.spring.cloud</groupId>
|
||||
<artifactId>tasksink</artifactId>
|
||||
<version>2.4.0-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Task Sink Sample Application</name>
|
||||
@@ -23,6 +23,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<skipInstall>true</skipInstall>
|
||||
<spring-cloud-stream>3.2.0-SNAPSHOT</spring-cloud-stream>
|
||||
<spring-cloud-task>3.0.0-SNAPSHOT</spring-cloud-task>
|
||||
<spring-cloud-deployer-version>2.7.0</spring-cloud-deployer-version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ public class TaskSinkApplicationTests {
|
||||
null, null);
|
||||
GenericMessage<TaskLaunchRequest> message = new GenericMessage<>(request);
|
||||
this.streamBridge.send("taskLauncherSink-in-0", message);
|
||||
|
||||
ArgumentCaptor<AppDeploymentRequest> deploymentRequest = ArgumentCaptor
|
||||
.forClass(AppDeploymentRequest.class);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-task-parent</artifactId>
|
||||
<version>2.4.1-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@@ -131,7 +131,7 @@ public class EventListenerTests {
|
||||
new RuntimeException("Test Exception"));
|
||||
|
||||
assertThat(getStringFromDestination(this.taskEventProperties.getItemProcessEventBindingName()))
|
||||
.isEqualTo("\"Exception while item was being processed\"");
|
||||
.isEqualTo("Exception while item was being processed");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -139,15 +139,15 @@ public class EventListenerTests {
|
||||
this.eventEmittingItemProcessListener.afterProcess("HELLO_AFTER_PROCESS_EQUAL",
|
||||
"HELLO_AFTER_PROCESS_EQUAL");
|
||||
assertThat(getStringFromDestination(this.taskEventProperties.getItemProcessEventBindingName()))
|
||||
.isEqualTo("\"item equaled result after processing\"");
|
||||
.isEqualTo("item equaled result after processing");
|
||||
|
||||
this.eventEmittingItemProcessListener.afterProcess("HELLO_NOT_EQUAL", "WORLD");
|
||||
assertThat(getStringFromDestination(this.taskEventProperties.getItemProcessEventBindingName()))
|
||||
.isEqualTo("\"item did not equal result after processing\"");
|
||||
.isEqualTo("item did not equal result after processing");
|
||||
|
||||
this.eventEmittingItemProcessListener.afterProcess("HELLO_AFTER_PROCESS", null);
|
||||
assertThat(getStringFromDestination(this.taskEventProperties.
|
||||
getItemProcessEventBindingName())).isEqualTo("\"1 item was filtered\"");
|
||||
getItemProcessEventBindingName())).isEqualTo("1 item was filtered");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -160,7 +160,7 @@ public class EventListenerTests {
|
||||
public void EventEmittingSkipListenerSkipRead() {
|
||||
this.eventEmittingSkipListener.onSkipInRead(new RuntimeException("Text Exception"));
|
||||
assertThat(getStringFromDestination(this.taskEventProperties.
|
||||
getSkipEventBindingName())).isEqualTo("\"Skipped when reading.\"");
|
||||
getSkipEventBindingName())).isEqualTo("Skipped when reading.");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -185,7 +185,7 @@ public class EventListenerTests {
|
||||
public void EventEmittingItemReadListener() {
|
||||
this.eventEmittingItemReadListener.onReadError(new RuntimeException("Text Exception"));
|
||||
assertThat(getStringFromDestination(this.taskEventProperties.
|
||||
getItemReadEventBindingName())).isEqualTo("\"Exception while item was being read\"");
|
||||
getItemReadEventBindingName())).isEqualTo("Exception while item was being read");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -204,14 +204,14 @@ public class EventListenerTests {
|
||||
public void EventEmittingItemWriteListenerBeforeWrite() {
|
||||
this.eventEmittingItemWriteListener.beforeWrite(getSampleList());
|
||||
assertThat(getStringFromDestination(this.taskEventProperties.getItemWriteEventBindingName()))
|
||||
.isEqualTo("\"3 items to be written.\"");
|
||||
.isEqualTo("3 items to be written.");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void EventEmittingItemWriteListenerAfterWrite() {
|
||||
this.eventEmittingItemWriteListener.afterWrite(getSampleList());
|
||||
assertThat(getStringFromDestination(this.taskEventProperties.getItemWriteEventBindingName()))
|
||||
.isEqualTo("\"3 items have been written.\"");
|
||||
.isEqualTo("3 items have been written.");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -220,7 +220,7 @@ public class EventListenerTests {
|
||||
this.eventEmittingItemWriteListener.onWriteError(exception, getSampleList());
|
||||
|
||||
assertThat(getStringFromDestination(this.taskEventProperties.getItemWriteEventBindingName()))
|
||||
.isEqualTo("\"Exception while 3 items are attempted to be written.\"");
|
||||
.isEqualTo("Exception while 3 items are attempted to be written.");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -274,7 +274,7 @@ public class EventListenerTests {
|
||||
|
||||
@Test
|
||||
public void EventEmittingChunkExecutionListenerBeforeChunk() {
|
||||
final String CHUNK_MESSAGE = "\"Before Chunk Processing\"";
|
||||
final String CHUNK_MESSAGE = "Before Chunk Processing";
|
||||
this.eventEmittingChunkListener.beforeChunk(getChunkContext());
|
||||
assertThat(getStringFromDestination(this.taskEventProperties.getChunkEventBindingName()))
|
||||
.isEqualTo(CHUNK_MESSAGE);
|
||||
@@ -282,7 +282,7 @@ public class EventListenerTests {
|
||||
|
||||
@Test
|
||||
public void EventEmittingChunkExecutionListenerAfterChunk() {
|
||||
final String CHUNK_MESSAGE = "\"After Chunk Processing\"";
|
||||
final String CHUNK_MESSAGE = "After Chunk Processing";
|
||||
this.eventEmittingChunkListener.afterChunk(getChunkContext());
|
||||
assertThat(getStringFromDestination(this.taskEventProperties.getChunkEventBindingName()))
|
||||
.isEqualTo(CHUNK_MESSAGE);
|
||||
|
||||
Reference in New Issue
Block a user