Merge pull request #462 from garyrussell/INT-2588
* INT-2588: INT-2588 Remove Deprecation
This commit is contained in:
@@ -19,7 +19,6 @@ package org.springframework.integration.event.inbound;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
@@ -36,7 +35,6 @@ import org.springframework.integration.core.PollableChannel;
|
||||
import org.springframework.integration.event.core.MessagingEvent;
|
||||
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.test.annotation.ExpectedException;
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
@@ -150,10 +148,11 @@ public class ApplicationEventListeningMessageProducerTests {
|
||||
assertEquals("test", message2.getPayload());
|
||||
}
|
||||
|
||||
@Test @ExpectedException(value=MessageHandlingException.class)
|
||||
@Test(expected=MessageHandlingException.class)
|
||||
public void anyApplicationEventCausesExceptionWithErrorHandling() {
|
||||
DirectChannel channel = new DirectChannel();
|
||||
channel.subscribe(new AbstractReplyProducingMessageHandler() {
|
||||
@Override
|
||||
protected Object handleRequestMessage(Message<?> requestMessage) {
|
||||
throw new RuntimeException("Failed");
|
||||
}
|
||||
@@ -168,10 +167,7 @@ public class ApplicationEventListeningMessageProducerTests {
|
||||
assertNotNull(message);
|
||||
assertEquals("Failed", ((Exception) message.getPayload()).getCause().getMessage());
|
||||
adapter.setErrorChannel(null);
|
||||
try {
|
||||
adapter.onApplicationEvent(new TestApplicationEvent1());
|
||||
fail("Expected MessageHandlingException");
|
||||
} catch (MessageHandlingException e) { }
|
||||
adapter.onApplicationEvent(new TestApplicationEvent1());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
id="tcpIn"
|
||||
connection-factory="client1"
|
||||
channel="in"
|
||||
retry-interval="1000"
|
||||
client-mode="true"/>
|
||||
|
||||
<int:channel id="cbChannel" />
|
||||
|
||||
@@ -40,7 +40,6 @@ import org.springframework.integration.core.SubscribableChannel;
|
||||
import org.springframework.integration.ip.IpHeaders;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.test.util.TestUtils;
|
||||
import org.springframework.test.annotation.ExpectedException;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@@ -130,7 +129,7 @@ public class CachingClientConnectionFactoryTests {
|
||||
conn2a.close();
|
||||
}
|
||||
|
||||
@Test @ExpectedException(MessagingException.class)
|
||||
@Test(expected=MessagingException.class)
|
||||
public void testLimit() throws Exception {
|
||||
AbstractClientConnectionFactory factory = mock(AbstractClientConnectionFactory.class);
|
||||
when(factory.isRunning()).thenReturn(true);
|
||||
|
||||
Reference in New Issue
Block a user