Merge pull request #51 from garyrussell/INTSAMPLES-75
* garyrussell-INTSAMPLES-75: INTSAMPLES-75 Fix For 2.2.0.M1
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spring.framework.version>3.1.0.RELEASE</spring.framework.version>
|
||||
<spring.integration.version>2.1.0.RELEASE</spring.integration.version>
|
||||
<spring.integration.version>2.2.0.M1</spring.integration.version>
|
||||
<log4j.version>1.2.16</log4j.version>
|
||||
<junit.version>4.10</junit.version>
|
||||
</properties>
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.Message;
|
||||
import org.springframework.integration.MessageChannel;
|
||||
import org.springframework.integration.MessageHandlingException;
|
||||
import org.springframework.integration.MessagingException;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
|
||||
/**
|
||||
@@ -47,14 +48,14 @@ public class FtpOutboundChannelAdapterSample {
|
||||
.build();
|
||||
try {
|
||||
channel.send(message);
|
||||
} catch (MessageHandlingException e) {
|
||||
} catch (MessagingException e) {
|
||||
assertTrue(e.getCause().getCause() instanceof UnknownHostException);
|
||||
assertEquals("host.for.cust1", e.getCause().getCause().getMessage());
|
||||
}
|
||||
// send another so we can see in the log we don't create the ac again.
|
||||
try {
|
||||
channel.send(message);
|
||||
} catch (MessageHandlingException e) {
|
||||
} catch (MessagingException e) {
|
||||
assertTrue(e.getCause().getCause() instanceof UnknownHostException);
|
||||
assertEquals("host.for.cust1", e.getCause().getCause().getMessage());
|
||||
}
|
||||
@@ -63,7 +64,7 @@ public class FtpOutboundChannelAdapterSample {
|
||||
.setHeader("customer", "cust2").build();
|
||||
try {
|
||||
channel.send(message);
|
||||
} catch (MessageHandlingException e) {
|
||||
} catch (MessagingException e) {
|
||||
assertTrue(e.getCause().getCause() instanceof UnknownHostException);
|
||||
assertEquals("host.for.cust2", e.getCause().getCause().getMessage());
|
||||
}
|
||||
@@ -74,7 +75,7 @@ public class FtpOutboundChannelAdapterSample {
|
||||
.setHeader("customer", "cust3").build();
|
||||
try {
|
||||
channel.send(message);
|
||||
} catch (MessageHandlingException e) {
|
||||
} catch (MessagingException e) {
|
||||
assertTrue(e.getCause().getCause() instanceof UnknownHostException);
|
||||
assertEquals("host.for.cust3", e.getCause().getCause().getMessage());
|
||||
}
|
||||
@@ -85,7 +86,7 @@ public class FtpOutboundChannelAdapterSample {
|
||||
.setHeader("customer", "cust1").build();
|
||||
try {
|
||||
channel.send(message);
|
||||
} catch (MessageHandlingException e) {
|
||||
} catch (MessagingException e) {
|
||||
assertTrue(e.getCause().getCause() instanceof UnknownHostException);
|
||||
assertEquals("host.for.cust1", e.getCause().getCause().getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user