Merge pull request #23 from Havret/transfer_settled_flag
AMQNET-608: Provider shouldn't sent transfer frames as settled
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 @@
{
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 @@
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 @@
testPeer.ExpectTransfer(Assert.IsNotNull);
-
producer.Send(session.CreateMessage());
testPeer.ExpectDetach(expectClosed: true, sendResponse: true, replyClosed: true);
@@ -725,7 +724,7 @@
IMessageProducer producer = session.CreateProducer(destination);
testPeer.ExpectTransfer(messageMatcher: Assert.IsNotNull,
stateMatcher: Assert.IsNull,
- settled: true,
+ settled: false,
sendResponseDisposition: true,
responseState: new Accepted(),
responseSettled: true,