Merge pull request #462 from garyrussell/INT-2588

* INT-2588:
  INT-2588 Remove Deprecation
This commit is contained in:
Oleg Zhurakousky
2012-05-25 15:31:02 -04:00
3 changed files with 5 additions and 9 deletions

View File

@@ -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());
}

View File

@@ -40,6 +40,7 @@
id="tcpIn"
connection-factory="client1"
channel="in"
retry-interval="1000"
client-mode="true"/>
<int:channel id="cbChannel" />

View File

@@ -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);