activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r897328 - /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/BytesMessageTest.cs
Date Fri, 08 Jan 2010 21:42:17 GMT
Author: tabish
Date: Fri Jan  8 21:42:16 2010
New Revision: 897328

URL: http://svn.apache.org/viewvc?rev=897328&view=rev
Log:
Improve the defense against getting a peer closed connection error from AMQ.

Modified:
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/BytesMessageTest.cs

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/BytesMessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/BytesMessageTest.cs?rev=897328&r1=897327&r2=897328&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/BytesMessageTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/BytesMessageTest.cs Fri
Jan  8 21:42:16 2010
@@ -29,25 +29,23 @@
         protected static string DESTINATION_NAME = "BytesMessageDestination";
         protected static string TEST_CLIENT_ID = "BytesMessageClientId";
         protected byte[] msgContent = {1, 2, 3, 4, 5, 6, 7, 8};
-        protected int postfix;
 
         [SetUp]
         public override void SetUp()
         {
-            this.postfix = new Random().Next();
         }
 
         [TearDown]
         public override void TearDown()
         {
         }
-
+        
         [RowTest]
         [Row(MsgDeliveryMode.Persistent)]
         [Row(MsgDeliveryMode.NonPersistent)]
         public void SendReceiveBytesMessage(MsgDeliveryMode deliveryMode)
         {
-            using(IConnection connection = CreateConnection(TEST_CLIENT_ID + ":" + this.postfix))
+            using(IConnection connection = CreateConnection(TEST_CLIENT_ID + ":" + new Random().Next()))
             {
                 connection.Start();
                 using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
@@ -76,7 +74,7 @@
         [Row(MsgDeliveryMode.NonPersistent)]
         public void SendReceiveBytesMessageContentTest(MsgDeliveryMode deliveryMode)
         {
-            using(IConnection connection = CreateConnection(TEST_CLIENT_ID + ":" + this.postfix))
+            using(IConnection connection = CreateConnection(TEST_CLIENT_ID + ":" + new Random().Next()))
             {
                 connection.Start();
                 using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))



Mime
View raw message