fix up test to expect settlement of messages in the committed transaction
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/86e51a85 Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/86e51a85 Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/86e51a85 Branch: refs/heads/master Commit: 86e51a850bded1d125e7efae629a743d531c62bf Parents: 9b0fbc7 Author: Robert Gemmell <[email protected]> Authored: Mon Nov 17 16:57:53 2014 +0000 Committer: Robert Gemmell <[email protected]> Committed: Mon Nov 17 16:57:53 2014 +0000 ---------------------------------------------------------------------- .../qpid/jms/integration/SessionIntegrationTest.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/86e51a85/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java index af03f37..58f1fa2 100644 --- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java @@ -357,9 +357,8 @@ public class SessionIntegrationTest extends QpidJmsTestCase { declareMatcher.setMessageContentMatcher(new EncodedAmqpValueMatcher(new Declare())); testPeer.expectTransfer(declareMatcher, false, new Declared().setTxnId(txnId), true); - for (int i = 1; i <= consumeCount; i++) { - // Then expect a TransactionalState disposition for each message once received by the consumer + // Then expect an *unsettled* TransactionalState disposition for each message once received by the consumer TransactionalStateMatcher stateMatcher = new TransactionalStateMatcher(); stateMatcher.withTxnId(equalTo(txnId)); stateMatcher.withOutcome(new DescriptorMatcher(Accepted.DESCRIPTOR_CODE, Accepted.DESCRIPTOR_SYMBOL)); @@ -384,6 +383,14 @@ public class SessionIntegrationTest extends QpidJmsTestCase { dischargeMatcher.setMessageContentMatcher(new EncodedAmqpValueMatcher(discharge)); testPeer.expectTransfer(dischargeMatcher, false, new Accepted(), true); + for (int i = 1; i <= consumeCount; i++) { + // Then expect a *settled* TransactionalState disposition for each message received by the consumer + TransactionalStateMatcher stateMatcher = new TransactionalStateMatcher(); + stateMatcher.withTxnId(equalTo(txnId)); + stateMatcher.withOutcome(new DescriptorMatcher(Accepted.DESCRIPTOR_CODE, Accepted.DESCRIPTOR_SYMBOL)); + testPeer.expectDisposition(true, stateMatcher); + } + session.commit(); testPeer.waitForAllHandlersToComplete(1000); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
