INT-680 correctly setting the 'receive-timeout' value for a 'poller' element
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -78,4 +78,14 @@ public class PollerParserTests {
|
||||
assertEquals(context.getBean("adviceBean3"), metadata.getAdviceChain().get(2));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pollerWithReceiveTimeout() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"pollerWithReceiveTimeout.xml", PollerParserTests.class);
|
||||
Object poller = context.getBean("poller");
|
||||
assertNotNull(poller);
|
||||
PollerMetadata metadata = (PollerMetadata) poller;
|
||||
assertEquals(1234, metadata.getReceiveTimeout());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd">
|
||||
|
||||
<poller id="poller" receive-timeout="1234">
|
||||
<interval-trigger interval="5" time-unit="SECONDS"/>
|
||||
</poller>
|
||||
|
||||
</beans:beans>
|
||||
Reference in New Issue
Block a user