Updated samples to use latest boot

Update integration tests to use latest stream paradigm
Update tests to be in compliance with 1.5.2.

resolves #289
This commit is contained in:
Glenn Renfro
2017-03-03 16:04:56 -05:00
committed by Michael Minella
parent 4dbc256a4c
commit 4e68adf5fa
13 changed files with 21 additions and 23 deletions

View File

@@ -27,6 +27,7 @@ import org.junit.After;
import org.junit.ClassRule;
import org.junit.Test;
import org.springframework.batch.core.scope.context.ChunkContext;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.stream.annotation.EnableBinding;
@@ -189,7 +190,7 @@ public class BatchExecutionEventTests {
public static class ItemProcessListenerBinding {
@StreamListener(Sink.INPUT)
public void receive(Object object) {
public void receive(String object) {
itemProcessLatch.countDown();
}
}
@@ -200,7 +201,7 @@ public class BatchExecutionEventTests {
public static class ChunkEventsListenerBinding {
@StreamListener(Sink.INPUT)
public void receive(Object chunkContext) {
public void receive(ChunkContext chunkContext) {
chunkEventsLatch.countDown();
}
}
@@ -223,7 +224,7 @@ public class BatchExecutionEventTests {
private static final String SKIPPING_READ_MESSAGE = "Skipped when reading.";
private static final String SKIPPING_WRITE_CONTENT = "-1";
@StreamListener(Sink.INPUT)
public void receive(Object exceptionMessage) {
public void receive(String exceptionMessage) {
if(exceptionMessage.toString().equals(SKIPPING_READ_MESSAGE)){
readSkipCount++;
}
@@ -240,7 +241,7 @@ public class BatchExecutionEventTests {
public static class ItemWriteEventsListenerBinding {
@StreamListener(Sink.INPUT)
public void receive(Object itemWrite) {
public void receive(String itemWrite) {
assertTrue("Message should start with '3 items'", itemWrite.toString().startsWith("3 items "));
assertTrue("Message should end with ' written.'", itemWrite.toString().endsWith(" written."));
itemWriteEventsLatch.countDown();