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 be45dc7 AMQNET-605: Pre-buffered messages shouldn't be released when
consumer closes down
new b842fe5 Merge pull request #41 from
Havret/Pre_buffered_messages_arent_released_when_consumer_closes_down
be45dc7 is described below
commit be45dc77a6d38854f75d7bbee22097df8f594c0f
Author: Havret <[email protected]>
AuthorDate: Tue Oct 1 19:11:43 2019 +0200
AMQNET-605: Pre-buffered messages shouldn't be released when consumer
closes down
---
.../Integration/ConsumerIntegrationTest.cs | 61 ----------------------
1 file changed, 61 deletions(-)
diff --git a/test/Apache-NMS-AMQP-Test/Integration/ConsumerIntegrationTest.cs
b/test/Apache-NMS-AMQP-Test/Integration/ConsumerIntegrationTest.cs
index d85e93b..cdb25e6 100644
--- a/test/Apache-NMS-AMQP-Test/Integration/ConsumerIntegrationTest.cs
+++ b/test/Apache-NMS-AMQP-Test/Integration/ConsumerIntegrationTest.cs
@@ -232,67 +232,6 @@ namespace NMS.AMQP.Test.Integration
}
}
- // TODO: To be fixed
- [Test, Timeout(20_000), Ignore("Ignore")]
- public void
TestCloseDurableSubscriberWithUnackedAndUnconsumedPrefetchedMessages()
- {
- using (TestAmqpPeer testPeer = new TestAmqpPeer())
- {
- IConnection connection = EstablishConnection(testPeer);
- connection.Start();
-
- testPeer.ExpectBegin();
-
- ISession session =
connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
-
- string topicName = "myTopic";
- string subscriptionName = "mySubscription";
- ITopic topic = session.GetTopic(topicName);
-
- int messageCount = 5;
- // Create a consumer and fill the prefetch with some messages,
- // which we will consume some of but ack none of.
- testPeer.ExpectDurableSubscriberAttach(topicName,
subscriptionName);
- testPeer.ExpectLinkFlowRespondWithTransfer(message:
CreateMessageWithContent(), count: messageCount);
-
- IMessageConsumer durableConsumer =
session.CreateDurableConsumer(topic, subscriptionName, null, false);
-
- int consumeCount = 2;
- IMessage receivedMessage = null;
- for (int i = 1; i <= consumeCount; i++)
- {
- receivedMessage = durableConsumer.Receive();
- Assert.NotNull(receivedMessage);
- Assert.IsInstanceOf<NmsTextMessage>(receivedMessage);
- }
-
- // Expect the messages that were not delivered to be released.
- for (int i = 1; i <= consumeCount; i++)
- {
- testPeer.ExpectDispositionThatIsAcceptedAndSettled();
- }
-
- receivedMessage.Acknowledge();
-
- testPeer.ExpectDetach(expectClosed: false, sendResponse: true,
replyClosed: false);
-
- for (int i = consumeCount + 1; i <= messageCount; i++)
- {
- testPeer.ExpectDispositionThatIsReleasedAndSettled();
- }
-
- testPeer.ExpectEnd();
-
- durableConsumer.Close();
- session.Close();
-
- testPeer.ExpectClose();
- connection.Close();
-
- testPeer.WaitForAllMatchersToComplete(3000);
- }
- }
-
[Test, Timeout(20_000)]
public void TestConsumerReceiveThrowsIfConnectionLost()
{