You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/10/27 22:35:59 UTC

svn commit: r830352 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/VirtualTopicTest.cs

Author: tabish
Date: Tue Oct 27 21:35:59 2009
New Revision: 830352

URL: http://svn.apache.org/viewvc?rev=830352&view=rev
Log:
* VirtualTopicTest.cs: 

Adds some cleanup code to try and purge to Queue's so that repeated runs of the tests don't fail.

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

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/VirtualTopicTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/VirtualTopicTest.cs?rev=830352&r1=830351&r2=830352&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/VirtualTopicTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/VirtualTopicTest.cs Tue Oct 27 21:35:59 2009
@@ -16,6 +16,7 @@
  */
 
 using Apache.NMS.Util;
+using Apache.NMS.ActiveMQ;
 using NUnit.Framework;
 using NUnit.Framework.Extensions;
 using System.Threading;
@@ -90,6 +91,18 @@
 							session.Commit();
 						}
 					}
+
+                    // Give the Broker some time to remove the subscriptions.
+                    Thread.Sleep(2000);
+
+                    try
+                    {
+                        ((Session) session).DeleteDestination(session.GetQueue(CONSUMER_A_DESTINATION_NAME));
+                        ((Session) session).DeleteDestination(session.GetQueue(CONSUMER_B_DESTINATION_NAME));
+                    }
+                    catch
+                    {
+                    }
 				}
 			}
 		}
@@ -144,7 +157,19 @@
 							Thread.Sleep(250);
 						}
 					}
-				}
+                    
+                    // Give the Broker some time to remove the subscriptions.
+                    Thread.Sleep(2000);
+
+                    try
+                    {
+                        ((Session) session).DeleteDestination(session.GetQueue(CONSUMER_A_DESTINATION_NAME));
+                        ((Session) session).DeleteDestination(session.GetQueue(CONSUMER_B_DESTINATION_NAME));
+				    }
+                    catch
+                    {
+                    }
+                }
 			}
 		}