Author: tabish
Date: Fri Nov 6 15:12:48 2009
New Revision: 833434
URL:
http://svn.apache.org/viewvc?rev=833434&view=revLog:
Add code to this DLQ test to purge the DLQ before running the test in case some other test leaves a message on the DLQ.
Modified:
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/AMQRedeliveryPolicyTest.cs
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/AMQRedeliveryPolicyTest.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/AMQRedeliveryPolicyTest.cs?rev=833434&r1=833433&r2=833434&view=diff==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/AMQRedeliveryPolicyTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/AMQRedeliveryPolicyTest.cs Fri Nov 6 15:12:48 2009
@@ -154,6 +154,12 @@
IMessageConsumer consumer = session.CreateConsumer(destination);
IMessageConsumer dlqConsumer = session.CreateConsumer(new ActiveMQQueue("ActiveMQ.DLQ"));
+ // Purge any messages already in the DLQ.
+ while(dlqConsumer.ReceiveNoWait() != null)
+ {
+ session.Commit();
+ }
+
// Send the messages
producer.Send(session.CreateTextMessage("1st"));
producer.Send(session.CreateTextMessage("2nd"));