INT-680 correctly setting the 'receive-timeout' value for a 'poller' element

This commit is contained in:
Mark Fisher
2009-06-25 00:17:24 +00:00
parent 9e46604275
commit 4d3c9d32fc
3 changed files with 26 additions and 1 deletions

View File

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

View File

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