INT-2588 Remove Deprecation

@ExpectedException is deprecated.

Also fixes a sporadic timing issue in the client mode test;
the default retry interval is 60 seconds and we only wait
10 seconds for the connection. If the initial connection
fails, we don't retry before the timeout.

INT-2527 Remove Event Deprecation

@Test @ExpectedException... -> @Test(expected...
This commit is contained in:
Gary Russell
2012-05-25 14:30:25 -04:00
committed by Oleg Zhurakousky
parent e828264867
commit fcd3771c17
3 changed files with 5 additions and 9 deletions

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