Fix compilation errros in integration latest snapshot
This commit is contained in:
@@ -32,8 +32,8 @@ import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.beans.factory.annotation.Required;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.channel.MessageChannel;
|
||||
import org.springframework.integration.dispatcher.DirectChannel;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
@@ -31,8 +31,6 @@ import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.JobParametersBuilder;
|
||||
import org.springframework.batch.core.repository.JobRepository;
|
||||
import org.springframework.batch.integration.JobRepositorySupport;
|
||||
import org.springframework.batch.integration.file.FileToMessagesJobFactoryBean;
|
||||
import org.springframework.batch.integration.file.ResourcePayloadAsJobParameterStrategy;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.file.FlatFileItemReader;
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
@@ -40,9 +38,9 @@ import org.springframework.batch.item.file.mapping.PassThroughFieldSetMapper;
|
||||
import org.springframework.batch.support.transaction.ResourcelessTransactionManager;
|
||||
import org.springframework.beans.factory.annotation.Required;
|
||||
import org.springframework.core.annotation.AnnotationUtils;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.channel.MessageChannel;
|
||||
import org.springframework.integration.channel.ThreadLocalChannel;
|
||||
import org.springframework.integration.dispatcher.DirectChannel;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
@@ -25,10 +25,10 @@ import java.lang.reflect.Method;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Required;
|
||||
import org.springframework.core.annotation.AnnotationUtils;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.channel.MessageChannel;
|
||||
import org.springframework.integration.channel.ThreadLocalChannel;
|
||||
import org.springframework.integration.dispatcher.DirectChannel;
|
||||
import org.springframework.integration.endpoint.HandlerEndpoint;
|
||||
import org.springframework.integration.endpoint.DefaultEndpoint;
|
||||
import org.springframework.integration.handler.MessageHandler;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.integration.message.MessageTarget;
|
||||
@@ -99,7 +99,7 @@ public class MessageChannelItemWriterTests {
|
||||
@Test
|
||||
public void testWriteWithRollbackOnEndpoint() throws Exception {
|
||||
DirectChannel channel = new DirectChannel();
|
||||
HandlerEndpoint endpoint = new HandlerEndpoint(new MessageHandler() {
|
||||
DefaultEndpoint<MessageHandler> endpoint = new DefaultEndpoint<MessageHandler>(new MessageHandler() {
|
||||
public Message<?> handle(Message<?> message) {
|
||||
throw new RuntimeException("Planned failure");
|
||||
}
|
||||
@@ -112,7 +112,8 @@ public class MessageChannelItemWriterTests {
|
||||
fail("Expected RuntimeException");
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
assertEquals("Planned failure", e.getMessage());
|
||||
// INT-377: this assertion fails because the exception is wrapped too tightly
|
||||
assertEquals("Planned failure", e.getCause().getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@ import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.batch.integration.JobRepositorySupport;
|
||||
import org.springframework.beans.factory.annotation.Required;
|
||||
import org.springframework.core.annotation.AnnotationUtils;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.channel.PollableChannel;
|
||||
import org.springframework.integration.channel.ThreadLocalChannel;
|
||||
import org.springframework.integration.dispatcher.DirectChannel;
|
||||
import org.springframework.integration.message.BlockingSource;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.message.Message;
|
||||
|
||||
@@ -55,8 +55,8 @@ public class JobLaunchingMessageHandlerIntegrationTests {
|
||||
requestChannel.send(trigger);
|
||||
}
|
||||
catch (MessageDeliveryException e) {
|
||||
String message = e.getCause().getMessage();
|
||||
assertTrue("Wrong message: " + message, message.contains("return address"));
|
||||
String message = e.getMessage();
|
||||
assertTrue("Wrong message: " + message, message.contains("reply target"));
|
||||
}
|
||||
Message<JobExecution> executionMessage = (Message<JobExecution>) responseChannel.receive(1000);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.batch.retry.interceptor.StatefulRetryOperationsInterc
|
||||
import org.springframework.batch.support.transaction.ResourcelessTransactionManager;
|
||||
import org.springframework.batch.support.transaction.TransactionAwareProxyFactory;
|
||||
import org.springframework.context.Lifecycle;
|
||||
import org.springframework.integration.dispatcher.DirectChannel;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.dispatcher.PollingDispatcher;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.message.Message;
|
||||
@@ -348,7 +348,7 @@ public class PollableSourceRetryTests {
|
||||
|
||||
private DirectChannel getChannel(MessageTarget target) {
|
||||
DirectChannel channel = new DirectChannel();
|
||||
channel.setName("input");
|
||||
channel.setBeanName("input");
|
||||
channel.subscribe(target);
|
||||
return channel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user