INT-1525: Add treatment for releasePartialSequences to ResequencerParser and CorrelatingMessageHandler

This commit is contained in:
Iwein Fuld
2010-10-15 17:20:58 +02:00
parent d68c9ba12b
commit 0ddc1fe667
4 changed files with 23 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ public class ResequencerParserTests {
"The ResequencerEndpoint is not configured with the appropriate 'send partial results on timeout' flag",
true, getPropertyValue(resequencer, "sendPartialResultOnExpiry"));
assertEquals("The ResequencerEndpoint is not configured with the appropriate 'release partial sequences' flag",
false, getPropertyValue(getPropertyValue(resequencer, "releaseStrategy"), "releasePartialSequences"));
true, getPropertyValue(getPropertyValue(resequencer, "releaseStrategy"), "releasePartialSequences"));
}
@Test
@@ -90,6 +90,15 @@ public class ResequencerParserTests {
.getBean("testCorrelationStrategy"), getPropertyValue(resequencer, "correlationStrategy"));
}
@Test
public void shouldSetReleasePartialSequencesFlag(){
EventDrivenConsumer endpoint = (EventDrivenConsumer) context.getBean("completelyDefinedResequencer");
CorrelatingMessageHandler resequencer = TestUtils.getPropertyValue(endpoint, "handler",
CorrelatingMessageHandler.class);
assertEquals("The ResequencerEndpoint is not configured with the appropriate 'release partial sequences' flag",
true, getPropertyValue(getPropertyValue(resequencer, "releaseStrategy"), "releasePartialSequences"));
}
@Test
public void testCorrelationStrategyRefAndMethod() throws Exception {
EventDrivenConsumer endpoint = (EventDrivenConsumer) context

View File

@@ -35,7 +35,7 @@
discard-channel="discardChannel"
send-timeout="86420000"
send-partial-result-on-expiry="true"
release-partial-sequences="false"/>
release-partial-sequences="true"/>
<resequencer id="resequencerWithCorrelationStrategyRefOnly"
input-channel="inputChannel3"