update test to verify there are capabilities
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/1ce194b7 Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/1ce194b7 Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/1ce194b7 Branch: refs/heads/master Commit: 1ce194b7eb2b129884f9f605f900c0996aa57017 Parents: ec7f398 Author: Robert Gemmell <[email protected]> Authored: Fri Nov 14 16:25:16 2014 +0000 Committer: Robert Gemmell <[email protected]> Committed: Fri Nov 14 16:25:16 2014 +0000 ---------------------------------------------------------------------- .../qpid/jms/integration/ConnectionIntegrationTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/1ce194b7/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java index 1e05ce3..38269bc 100644 --- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java @@ -22,6 +22,7 @@ package org.apache.qpid.jms.integration; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import static org.hamcrest.Matchers.instanceOf; import javax.jms.Connection; import javax.jms.ConnectionMetaData; @@ -30,6 +31,7 @@ import javax.jms.Session; import org.apache.qpid.jms.test.QpidJmsTestCase; import org.apache.qpid.jms.test.testpeer.TestAmqpPeer; import org.apache.qpid.jms.test.testpeer.matchers.CoordinatorMatcher; +import org.apache.qpid.proton.amqp.Symbol; import org.junit.Test; // TODO find a way to make the test abort immediately if the TestAmqpPeer throws an exception @@ -60,10 +62,12 @@ public class ConnectionIntegrationTest extends QpidJmsTestCase { try (TestAmqpPeer testPeer = new TestAmqpPeer(IntegrationTestFixture.PORT);) { Connection connection = testFixture.establishConnecton(testPeer); - CoordinatorMatcher txCoordinatorMatcher = new CoordinatorMatcher(); - testPeer.expectBegin(true); + // Expect the session, with an immediate link to the transaction coordinator + CoordinatorMatcher txCoordinatorMatcher = new CoordinatorMatcher(); + txCoordinatorMatcher.withCapabilities(instanceOf(Symbol[].class)); testPeer.expectSenderAttach(txCoordinatorMatcher, false, false); + Session session = connection.createSession(true, Session.SESSION_TRANSACTED); assertNotNull("Session should not be null", session); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
