From 449595a4b2abfee098f411f9dec9aa6c216207a5 Mon Sep 17 00:00:00 2001 From: Glenn Renfro Date: Tue, 7 Dec 2021 13:23:44 -0500 Subject: [PATCH] Updated base project to 3.x --- docs/pom.xml | 2 +- pom.xml | 2 +- .../pom.xml | 2 +- spring-cloud-starter-task/pom.xml | 2 +- spring-cloud-task-batch/pom.xml | 2 +- spring-cloud-task-core/pom.xml | 2 +- spring-cloud-task-dependencies/pom.xml | 2 +- spring-cloud-task-integration-tests/pom.xml | 2 +- .../listener/BatchExecutionEventTests.java | 16 +++++++------- .../batch-events/pom.xml | 8 +++++++ spring-cloud-task-samples/pom.xml | 2 +- spring-cloud-task-samples/tasksink/pom.xml | 3 ++- .../io/spring/TaskSinkApplicationTests.java | 1 + spring-cloud-task-stream/pom.xml | 2 +- .../batch/listener/EventListenerTests.java | 22 +++++++++---------- 15 files changed, 40 insertions(+), 30 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index 8bbc41cf..28627635 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -4,7 +4,7 @@ org.springframework.cloud spring-cloud-task-parent - 2.4.1-SNAPSHOT + 3.0.0-SNAPSHOT spring-cloud-task-docs Spring Cloud Task Docs diff --git a/pom.xml b/pom.xml index 50cdaf55..2bc18e97 100755 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.springframework.cloud spring-cloud-task-parent - 2.4.1-SNAPSHOT + 3.0.0-SNAPSHOT pom Spring Cloud Task Build Spring Cloud Task Build diff --git a/spring-cloud-starter-single-step-batch-job/pom.xml b/spring-cloud-starter-single-step-batch-job/pom.xml index 3a8df54f..4a5f87e6 100644 --- a/spring-cloud-starter-single-step-batch-job/pom.xml +++ b/spring-cloud-starter-single-step-batch-job/pom.xml @@ -3,7 +3,7 @@ spring-cloud-task-parent org.springframework.cloud - 2.4.1-SNAPSHOT + 3.0.0-SNAPSHOT 4.0.0 diff --git a/spring-cloud-starter-task/pom.xml b/spring-cloud-starter-task/pom.xml index 11595ad6..c1150754 100644 --- a/spring-cloud-starter-task/pom.xml +++ b/spring-cloud-starter-task/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-task-parent - 2.4.1-SNAPSHOT + 3.0.0-SNAPSHOT spring-cloud-starter-task diff --git a/spring-cloud-task-batch/pom.xml b/spring-cloud-task-batch/pom.xml index 7f2ebdd5..02b70a15 100644 --- a/spring-cloud-task-batch/pom.xml +++ b/spring-cloud-task-batch/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-task-parent - 2.4.1-SNAPSHOT + 3.0.0-SNAPSHOT spring-cloud-task-batch diff --git a/spring-cloud-task-core/pom.xml b/spring-cloud-task-core/pom.xml index 3c1674f2..3589beca 100755 --- a/spring-cloud-task-core/pom.xml +++ b/spring-cloud-task-core/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-task-parent - 2.4.1-SNAPSHOT + 3.0.0-SNAPSHOT spring-cloud-task-core diff --git a/spring-cloud-task-dependencies/pom.xml b/spring-cloud-task-dependencies/pom.xml index 1aa17356..552b49a6 100644 --- a/spring-cloud-task-dependencies/pom.xml +++ b/spring-cloud-task-dependencies/pom.xml @@ -2,7 +2,7 @@ 4.0.0 spring-cloud-task-dependencies - 2.4.1-SNAPSHOT + 3.0.0-SNAPSHOT pom Spring Cloud Task Dependencies Spring Cloud Task Dependencies diff --git a/spring-cloud-task-integration-tests/pom.xml b/spring-cloud-task-integration-tests/pom.xml index 26f38fa5..9c61fc9b 100644 --- a/spring-cloud-task-integration-tests/pom.xml +++ b/spring-cloud-task-integration-tests/pom.xml @@ -3,7 +3,7 @@ spring-cloud-task-parent org.springframework.cloud - 2.4.1-SNAPSHOT + 3.0.0-SNAPSHOT 4.0.0 Spring Cloud Task Integration Tests diff --git a/spring-cloud-task-integration-tests/src/test/java/org/springframework/cloud/task/listener/BatchExecutionEventTests.java b/spring-cloud-task-integration-tests/src/test/java/org/springframework/cloud/task/listener/BatchExecutionEventTests.java index af8e70b5..4b5bd910 100644 --- a/spring-cloud-task-integration-tests/src/test/java/org/springframework/cloud/task/listener/BatchExecutionEventTests.java +++ b/spring-cloud-task-integration-tests/src/test/java/org/springframework/cloud/task/listener/BatchExecutionEventTests.java @@ -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> result = testListenerSkip( "--spring.cloud.task.batch.events.skipEventBindingName=" + bindingName, diff --git a/spring-cloud-task-samples/batch-events/pom.xml b/spring-cloud-task-samples/batch-events/pom.xml index 520b35a6..03b74638 100644 --- a/spring-cloud-task-samples/batch-events/pom.xml +++ b/spring-cloud-task-samples/batch-events/pom.xml @@ -24,6 +24,7 @@ 1.16.1 1.0.8 3.2.0-SNAPSHOT + 3.0.0-SNAPSHOT @@ -42,6 +43,13 @@ pom import + + org.springframework.cloud + spring-cloud-task-dependencies + ${spring.cloud.task} + pom + import + diff --git a/spring-cloud-task-samples/pom.xml b/spring-cloud-task-samples/pom.xml index c2454012..d2f43c17 100644 --- a/spring-cloud-task-samples/pom.xml +++ b/spring-cloud-task-samples/pom.xml @@ -11,7 +11,7 @@ org.springframework.cloud spring-cloud-task-parent - 2.4.1-SNAPSHOT + 3.0.0-SNAPSHOT diff --git a/spring-cloud-task-samples/tasksink/pom.xml b/spring-cloud-task-samples/tasksink/pom.xml index 72416758..89331da8 100644 --- a/spring-cloud-task-samples/tasksink/pom.xml +++ b/spring-cloud-task-samples/tasksink/pom.xml @@ -4,7 +4,7 @@ io.spring.cloud tasksink - 2.4.0-SNAPSHOT + 3.0.0-SNAPSHOT jar Task Sink Sample Application @@ -23,6 +23,7 @@ UTF-8 true 3.2.0-SNAPSHOT + 3.0.0-SNAPSHOT 2.7.0 diff --git a/spring-cloud-task-samples/tasksink/src/test/java/io/spring/TaskSinkApplicationTests.java b/spring-cloud-task-samples/tasksink/src/test/java/io/spring/TaskSinkApplicationTests.java index 1b9b38a4..879d2af0 100644 --- a/spring-cloud-task-samples/tasksink/src/test/java/io/spring/TaskSinkApplicationTests.java +++ b/spring-cloud-task-samples/tasksink/src/test/java/io/spring/TaskSinkApplicationTests.java @@ -64,6 +64,7 @@ public class TaskSinkApplicationTests { null, null); GenericMessage message = new GenericMessage<>(request); this.streamBridge.send("taskLauncherSink-in-0", message); + ArgumentCaptor deploymentRequest = ArgumentCaptor .forClass(AppDeploymentRequest.class); diff --git a/spring-cloud-task-stream/pom.xml b/spring-cloud-task-stream/pom.xml index 4eb65bcb..1be77a3b 100644 --- a/spring-cloud-task-stream/pom.xml +++ b/spring-cloud-task-stream/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-task-parent - 2.4.1-SNAPSHOT + 3.0.0-SNAPSHOT diff --git a/spring-cloud-task-stream/src/test/java/org/springframework/cloud/task/batch/listener/EventListenerTests.java b/spring-cloud-task-stream/src/test/java/org/springframework/cloud/task/batch/listener/EventListenerTests.java index 4ec7a9b4..bd958313 100644 --- a/spring-cloud-task-stream/src/test/java/org/springframework/cloud/task/batch/listener/EventListenerTests.java +++ b/spring-cloud-task-stream/src/test/java/org/springframework/cloud/task/batch/listener/EventListenerTests.java @@ -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);