qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject [1/2] qpid-broker-j git commit: QPID-7816: [Java Broker] Add test sending transfer without a delivery tag
Date Wed, 07 Jun 2017 15:39:36 GMT
Repository: qpid-broker-j
Updated Branches:
  refs/heads/master 6ee02c1ef -> 4b4f1cd75


QPID-7816: [Java Broker] Add test sending transfer without a delivery tag


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/4b4f1cd7
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/4b4f1cd7
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/4b4f1cd7

Branch: refs/heads/master
Commit: 4b4f1cd7595388152b15c84645e748d07b15c873
Parents: aa1f6ff
Author: Alex Rudyy <orudyy@apache.org>
Authored: Wed Jun 7 15:15:25 2017 +0100
Committer: Alex Rudyy <orudyy@apache.org>
Committed: Wed Jun 7 16:38:55 2017 +0100

----------------------------------------------------------------------
 .../protocol/v1_0/messaging/TransferTest.java   | 31 ++++++++++++++++++++
 1 file changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/4b4f1cd7/systests/protocol-tests-amqp-1-0/src/test/java/org/apache/qpid/tests/protocol/v1_0/messaging/TransferTest.java
----------------------------------------------------------------------
diff --git a/systests/protocol-tests-amqp-1-0/src/test/java/org/apache/qpid/tests/protocol/v1_0/messaging/TransferTest.java
b/systests/protocol-tests-amqp-1-0/src/test/java/org/apache/qpid/tests/protocol/v1_0/messaging/TransferTest.java
index 3e57371..92781d5 100644
--- a/systests/protocol-tests-amqp-1-0/src/test/java/org/apache/qpid/tests/protocol/v1_0/messaging/TransferTest.java
+++ b/systests/protocol-tests-amqp-1-0/src/test/java/org/apache/qpid/tests/protocol/v1_0/messaging/TransferTest.java
@@ -96,6 +96,37 @@ public class TransferTest extends ProtocolTestBase
         }
     }
 
+    @Ignore("QPID-7816")
+    @Test
+    @SpecificationTest(section = "2.7.5",
+            description = "[delivery-tag] MUST be specified for the first transfer "
+                          + "[...] and can only be omitted for continuation transfers.")
+    public void transferWithoutDeliveryTag() throws Exception
+    {
+        try (FrameTransport transport = new FrameTransport(_brokerAddress))
+        {
+            final UnsignedInteger linkHandle = UnsignedInteger.ONE;
+            transport.doAttachSendingLink(linkHandle, BrokerAdmin.TEST_QUEUE_NAME);
+
+            MessageEncoder messageEncoder = new MessageEncoder();
+            messageEncoder.addData("foo");
+
+            Transfer transfer = new Transfer();
+            transfer.setHandle(linkHandle);
+            transfer.setDeliveryId(UnsignedInteger.ZERO);
+            transfer.setPayload(messageEncoder.getPayload());
+
+            transport.sendPerformative(transfer);
+            PerformativeResponse response = (PerformativeResponse) transport.getNextResponse();
+
+            assertThat(response, is(notNullValue()));
+            assertThat(response.getFrameBody(), is(instanceOf(Close.class)));
+            Close responseClose = (Close) response.getFrameBody();
+            assertThat(responseClose.getError(), is(notNullValue()));
+            assertThat(responseClose.getError().getCondition(), equalTo(AmqpError.INVALID_FIELD));
+        }
+    }
+
     @Test
     @SpecificationTest(section = "2.6.12",
             description = "Transferring A Message.")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message