You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by mi...@apache.org on 2019/08/30 09:15:34 UTC

[activemq-nms-amqp] branch master updated: AMQNET-608: Provider shouldn't sent transfer frames as settled

This is an automated email from the ASF dual-hosted git repository.

michaelpearce pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-nms-amqp.git


The following commit(s) were added to refs/heads/master by this push:
     new 263c098  AMQNET-608: Provider shouldn't sent transfer frames as settled
     new 25ec0aa  Merge pull request #23 from Havret/transfer_settled_flag
263c098 is described below

commit 263c098808f40547f5c623137b1ec4e288b5205d
Author: Havret <h4...@gmail.com>
AuthorDate: Wed Aug 28 22:45:50 2019 +0200

    AMQNET-608: Provider shouldn't sent transfer frames as settled
    
    when sender settled mode is unsettled
---
 src/NMS.AMQP/Provider/Amqp/AmqpHandler.cs                        | 1 +
 test/Apache-NMS-AMQP-Test/Integration/ProducerIntegrationTest.cs | 5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/NMS.AMQP/Provider/Amqp/AmqpHandler.cs b/src/NMS.AMQP/Provider/Amqp/AmqpHandler.cs
index 6841d78..fdabb12 100644
--- a/src/NMS.AMQP/Provider/Amqp/AmqpHandler.cs
+++ b/src/NMS.AMQP/Provider/Amqp/AmqpHandler.cs
@@ -48,6 +48,7 @@ namespace Apache.NMS.AMQP.Provider.Amqp
             {
                 case EventId.SendDelivery when protocolEvent.Context is IDelivery delivery:
                     delivery.Batchable = false;
+                    delivery.Settled = false;
                     break;
                 case EventId.ConnectionRemoteOpen when protocolEvent.Context is Open open:
                     this.connection.OnRemoteOpened(open);
diff --git a/test/Apache-NMS-AMQP-Test/Integration/ProducerIntegrationTest.cs b/test/Apache-NMS-AMQP-Test/Integration/ProducerIntegrationTest.cs
index d34d529..11d7d66 100644
--- a/test/Apache-NMS-AMQP-Test/Integration/ProducerIntegrationTest.cs
+++ b/test/Apache-NMS-AMQP-Test/Integration/ProducerIntegrationTest.cs
@@ -234,7 +234,7 @@ namespace NMS.AMQP.Test.Integration
 
                         Assert.AreEqual(text, (message.BodySection as AmqpValue).Value);
                     }, stateMatcher: Assert.IsNull,
-                    settled: true, // 
+                    settled: false,
                     sendResponseDisposition: true,
                     responseState: new Accepted(),
                     responseSettled: true);
@@ -634,7 +634,6 @@ namespace NMS.AMQP.Test.Integration
 
                 testPeer.ExpectTransfer(Assert.IsNotNull);
 
-
                 producer.Send(session.CreateMessage());
 
                 testPeer.ExpectDetach(expectClosed: true, sendResponse: true, replyClosed: true);
@@ -725,7 +724,7 @@ namespace NMS.AMQP.Test.Integration
                 IMessageProducer producer = session.CreateProducer(destination);
                 testPeer.ExpectTransfer(messageMatcher: Assert.IsNotNull,
                     stateMatcher: Assert.IsNull,
-                    settled: true,
+                    settled: false,
                     sendResponseDisposition: true,
                     responseState: new Accepted(),
                     responseSettled: true,