activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1695737 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/QueueBrowserTests.cs
Date Thu, 13 Aug 2015 16:39:20 GMT
Author: tabish
Date: Thu Aug 13 16:39:19 2015
New Revision: 1695737

URL: http://svn.apache.org/r1695737
Log:
Fix test so that it removes the test Queue first and add a bit of logging.  
Fixes [AMQNET-505]. (See https://issues.apache.org/jira/browse/AMQNET-505)

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/QueueBrowserTests.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/QueueBrowserTests.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/QueueBrowserTests.cs?rev=1695737&r1=1695736&r2=1695737&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/QueueBrowserTests.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/QueueBrowserTests.cs
Thu Aug 13 16:39:19 2015
@@ -213,12 +213,15 @@ namespace Apache.NMS.ActiveMQ.Test
             const int MESSAGES_TO_SEND = 50;
             const string QUEUE_NAME = "TEST.TestBrowsingExpiration";
 
-            SendTestMessages(MESSAGES_TO_SEND, QUEUE_NAME);
-
             // Browse the queue.
             using (Connection connection = CreateConnection() as Connection)
             using (ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
+            using (IQueue queue = session.GetQueue(QUEUE_NAME))
             {
+                session.DeleteDestination(queue);
+
+                SendTestMessages(MESSAGES_TO_SEND, QUEUE_NAME);
+
                 connection.Start();
                 int browsed = Browse(QUEUE_NAME, connection);
 
@@ -250,6 +253,8 @@ namespace Apache.NMS.ActiveMQ.Test
                 IEnumerator enumeration = browser.GetEnumerator();
                 while (enumeration.MoveNext())
                 {
+                    ITextMessage message = enumeration.Current as ITextMessage;
+                    Tracer.DebugFormat("Browsed message: {0}", message.NMSMessageId);
                     browsed++;
                 }
             }



Mime
View raw message