title and organise into sections of related tests
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/6bcb5546 Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/6bcb5546 Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/6bcb5546 Branch: refs/heads/master Commit: 6bcb55460220f74d762d288d67dbb646f82b564f Parents: 7525ab9 Author: Robert Gemmell <rob...@apache.org> Authored: Wed Oct 15 12:45:42 2014 +0100 Committer: Robert Gemmell <rob...@apache.org> Committed: Thu Oct 16 16:55:32 2014 +0100 ---------------------------------------------------------------------- .../jms/integration/MessageIntegrationTest.java | 64 ++++++++++++-------- 1 file changed, 39 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/6bcb5546/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java index f46a6d0..24ecc64 100644 --- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java @@ -59,7 +59,6 @@ import org.apache.qpid.proton.amqp.DescribedType; import org.apache.qpid.proton.amqp.Symbol; import org.apache.qpid.proton.amqp.UnsignedInteger; import org.apache.qpid.proton.amqp.UnsignedLong; -import org.junit.Ignore; import org.junit.Test; public class MessageIntegrationTest extends QpidJmsTestCase @@ -85,6 +84,9 @@ public class MessageIntegrationTest extends QpidJmsTestCase private final IntegrationTestFixture testFixture = new IntegrationTestFixture(); + //==== Application Properties Section ==== + //======================================== + @Test(timeout = 2000) public void testSendMessageWithApplicationProperties() throws Exception { try (TestAmqpPeer testPeer = new TestAmqpPeer(IntegrationTestFixture.PORT);) { @@ -197,30 +199,8 @@ public class MessageIntegrationTest extends QpidJmsTestCase } } - @Test(timeout = 2000) - public void testReceiveMessageWithoutMessageId() throws Exception { - try (TestAmqpPeer testPeer = new TestAmqpPeer(IntegrationTestFixture.PORT);) { - Connection connection = testFixture.establishConnecton(testPeer); - connection.start(); - - testPeer.expectBegin(true); - - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - Queue queue = session.createQueue("myQueue"); - - DescribedType amqpValueNullContent = new AmqpValueDescribedType(null); - - testPeer.expectReceiverAttach(); - testPeer.expectLinkFlowRespondWithTransfer(null, null, null, null, amqpValueNullContent); - testPeer.expectDispositionThatIsAcceptedAndSettled(); - - MessageConsumer messageConsumer = session.createConsumer(queue); - Message receivedMessage = messageConsumer.receive(1000); - testPeer.waitForAllHandlersToComplete(2000); - - assertNull(receivedMessage.getJMSMessageID()); - } - } + //==== Destination Handling ==== + //============================== /** * Tests that the {@link AmqpMessageSupport#AMQP_TO_ANNOTATION} set on a message to @@ -443,6 +423,9 @@ public class MessageIntegrationTest extends QpidJmsTestCase } } + //==== TTL / Expiration Handling ==== + //=================================== + /** * Tests that lack of the absolute-expiry-time and ttl fields on a message results * in it returning 0 for for JMSExpiration @@ -512,6 +495,34 @@ public class MessageIntegrationTest extends QpidJmsTestCase } } + //==== MessageID and CorrelationID Handling ==== + //============================================== + + @Test(timeout = 2000) + public void testReceiveMessageWithoutMessageId() throws Exception { + try (TestAmqpPeer testPeer = new TestAmqpPeer(IntegrationTestFixture.PORT);) { + Connection connection = testFixture.establishConnecton(testPeer); + connection.start(); + + testPeer.expectBegin(true); + + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + Queue queue = session.createQueue("myQueue"); + + DescribedType amqpValueNullContent = new AmqpValueDescribedType(null); + + testPeer.expectReceiverAttach(); + testPeer.expectLinkFlowRespondWithTransfer(null, null, null, null, amqpValueNullContent); + testPeer.expectDispositionThatIsAcceptedAndSettled(); + + MessageConsumer messageConsumer = session.createConsumer(queue); + Message receivedMessage = messageConsumer.receive(1000); + testPeer.waitForAllHandlersToComplete(2000); + + assertNull(receivedMessage.getJMSMessageID()); + } + } + /** * Tests that receiving a message with a string typed message-id results in returning the * expected value for JMSMessageId where the JMS "ID:" prefix has been added. @@ -860,6 +871,9 @@ public class MessageIntegrationTest extends QpidJmsTestCase } } + //==== Group Property Handling ==== + //================================= + /** * Tests that when receiving a message with the group-id, reply-to-group-id, and group-sequence * fields of the AMQP properties section set, that the expected JMSX or JMS_AMQP properties --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org