activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [32/50] [abbrv] activemq-nms-openwire git commit: 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)
Date Wed, 08 Mar 2017 23:12:34 GMT
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)



Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/commit/262ebde7
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/tree/262ebde7
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/diff/262ebde7

Branch: refs/heads/master
Commit: 262ebde72bf5a2a5ac67f29dbad2b364345a0bc3
Parents: 009fa01
Author: Timothy A. Bish <tabish@apache.org>
Authored: Thu Aug 13 16:39:19 2015 +0000
Committer: Timothy A. Bish <tabish@apache.org>
Committed: Thu Aug 13 16:39:19 2015 +0000

----------------------------------------------------------------------
 src/test/csharp/QueueBrowserTests.cs | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/blob/262ebde7/src/test/csharp/QueueBrowserTests.cs
----------------------------------------------------------------------
diff --git a/src/test/csharp/QueueBrowserTests.cs b/src/test/csharp/QueueBrowserTests.cs
index 5e9bf6c..c737090 100644
--- a/src/test/csharp/QueueBrowserTests.cs
+++ b/src/test/csharp/QueueBrowserTests.cs
@@ -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