activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r1538073 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp: DtcBasicTransactionsTest.cs DtcConsumerTransactionsTest.cs DtcProducerTransactionsTest.cs DtcTransactionsTestSupport.cs
Date Fri, 01 Nov 2013 22:22:34 GMT
Author: jgomes
Date: Fri Nov  1 22:22:34 2013
New Revision: 1538073

URL: http://svn.apache.org/r1538073
Log:
Rename class variable to avoid conflicting with base class variable.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcBasicTransactionsTest.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcConsumerTransactionsTest.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcProducerTransactionsTest.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcTransactionsTestSupport.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcBasicTransactionsTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcBasicTransactionsTest.cs?rev=1538073&r1=1538072&r2=1538073&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcBasicTransactionsTest.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcBasicTransactionsTest.cs
Fri Nov  1 22:22:34 2013
@@ -31,15 +31,15 @@ namespace Apache.NMS.ActiveMQ.Test
         {
             base.SetUp();
 
-            this.factory = new NetTxConnectionFactory(ReplaceEnvVar(connectionURI));
-            this.factory.ConfiguredResourceManagerId = Guid.NewGuid().ToString();
+            this.dtcFactory = new NetTxConnectionFactory(ReplaceEnvVar(connectionURI));
+            this.dtcFactory.ConfiguredResourceManagerId = Guid.NewGuid().ToString();
         }
 
         [Test]
         [ExpectedException("Apache.NMS.NMSException")]
         public void TestSessionCreateFailsWithInvalidLogLocation()
         {
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -57,7 +57,7 @@ namespace Apache.NMS.ActiveMQ.Test
             // Test initialize - Fills in DB with data to send.
             PrepareDatabase();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -81,7 +81,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcConsumerTransactionsTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcConsumerTransactionsTest.cs?rev=1538073&r1=1538072&r2=1538073&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcConsumerTransactionsTest.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcConsumerTransactionsTest.cs
Fri Nov  1 22:22:34 2013
@@ -36,8 +36,8 @@ namespace Apache.NMS.ActiveMQ.Test
         {
             base.SetUp();
 
-            this.factory = new NetTxConnectionFactory(ReplaceEnvVar(connectionURI));
-            this.factory.ConfiguredResourceManagerId = Guid.NewGuid().ToString();
+            this.dtcFactory = new NetTxConnectionFactory(ReplaceEnvVar(connectionURI));
+            this.dtcFactory.ConfiguredResourceManagerId = Guid.NewGuid().ToString();
         }
 
         [Test]
@@ -48,7 +48,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeAndFillQueue();
 
             // receive just one
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.Start();
 
@@ -111,7 +111,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue(messageCount);
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.Start();
 
@@ -182,7 +182,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue(messageCount);
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.Start();
 
@@ -252,7 +252,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue(messageCount);
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 // allow no redelivery so that message immediatly goes to the DLQ if first
read fails
                 connection.RedeliveryPolicy.MaximumRedeliveries = 0;
@@ -319,7 +319,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -351,7 +351,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -383,7 +383,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue(5 * MSG_COUNT);
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -411,7 +411,7 @@ namespace Apache.NMS.ActiveMQ.Test
             string newConnectionUri =
                 connectionURI + "?nms.RecoveryPolicy.RecoveryLogger.Location=" + logLocation
+
                                 "&nms.configuredResourceManagerId=" + 
-                                factory.ConfiguredResourceManagerId;
+                                dtcFactory.ConfiguredResourceManagerId;
 
             // Test initialize - Fills in queue with data to send and clears the DB.
             PurgeDatabase();
@@ -424,9 +424,9 @@ namespace Apache.NMS.ActiveMQ.Test
 
             Directory.CreateDirectory(logLocation);
 
-            factory = new NetTxConnectionFactory(ReplaceEnvVar(newConnectionUri));
+            dtcFactory = new NetTxConnectionFactory(ReplaceEnvVar(newConnectionUri));
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -460,7 +460,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -485,7 +485,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -515,7 +515,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 ITransport transport = (connection as Connection).ITransport;
                 TcpFaultyTransport tcpFaulty = transport.Narrow(typeof(TcpFaultyTransport))
as TcpFaultyTransport;
@@ -548,7 +548,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 ITransport transport = (connection as Connection).ITransport;
                 TcpFaultyTransport tcpFaulty = transport.Narrow(typeof(TcpFaultyTransport))
as TcpFaultyTransport;
@@ -586,7 +586,7 @@ namespace Apache.NMS.ActiveMQ.Test
 
             var enlistment = new TestSinglePhaseCommit();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.Start();
 
@@ -667,7 +667,7 @@ namespace Apache.NMS.ActiveMQ.Test
             PurgeDatabase();
             PurgeAndFillQueue(MSG_COUNT * BATCH_COUNT);
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             using (NetTxSession session = connection.CreateNetTxSession() as NetTxSession)
             {
                 IQueue queue = session.GetQueue(testQueueName);

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcProducerTransactionsTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcProducerTransactionsTest.cs?rev=1538073&r1=1538072&r2=1538073&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcProducerTransactionsTest.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcProducerTransactionsTest.cs
Fri Nov  1 22:22:34 2013
@@ -34,8 +34,8 @@ namespace Apache.NMS.ActiveMQ.Test
         {
             base.SetUp();
 
-            this.factory = new NetTxConnectionFactory(ReplaceEnvVar(connectionURI));
-            this.factory.ConfiguredResourceManagerId = Guid.NewGuid().ToString();
+            this.dtcFactory = new NetTxConnectionFactory(ReplaceEnvVar(connectionURI));
+            this.dtcFactory.ConfiguredResourceManagerId = Guid.NewGuid().ToString();
         }
 
         [Test]
@@ -44,7 +44,7 @@ namespace Apache.NMS.ActiveMQ.Test
             // Test initialize - Fills in DB with data to send.
             PrepareDatabase();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -76,7 +76,7 @@ namespace Apache.NMS.ActiveMQ.Test
             // Test initialize - Fills in DB with data to send.
             PrepareDatabase();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -107,11 +107,11 @@ namespace Apache.NMS.ActiveMQ.Test
             // Test initialize - Fills in DB with data to send.
             PrepareDatabase();
 
-            NetTxConnectionFactory netTxFactory = factory;
+            NetTxConnectionFactory netTxFactory = dtcFactory;
             RecoveryFileLogger logger = netTxFactory.RecoveryPolicy.RecoveryLogger as RecoveryFileLogger;
             string logDirectory = logger.Location;
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -151,11 +151,11 @@ namespace Apache.NMS.ActiveMQ.Test
             string newConnectionUri = 
                 connectionURI + "?nms.RecoveryPolicy.RecoveryLoggerType=harness" +
                                 "&nms.configuredResourceManagerId=" +
-                                factory.ConfiguredResourceManagerId;
+                                dtcFactory.ConfiguredResourceManagerId;
 
-            factory = new NetTxConnectionFactory(ReplaceEnvVar(newConnectionUri));
+            dtcFactory = new NetTxConnectionFactory(ReplaceEnvVar(newConnectionUri));
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 IRecoveryLogger logger = (connection as NetTxConnection).RecoveryPolicy.RecoveryLogger;
                 Assert.IsNotNull(logger);
@@ -185,7 +185,7 @@ namespace Apache.NMS.ActiveMQ.Test
             // Test initialize - Fills in DB with data to send.
             PrepareDatabase();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -213,7 +213,7 @@ namespace Apache.NMS.ActiveMQ.Test
             // Test initialize - Fills in DB with data to send.
             PrepareDatabase();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -241,7 +241,7 @@ namespace Apache.NMS.ActiveMQ.Test
             // Test initialize - Fills in DB with data to send.
             PrepareDatabase();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -264,7 +264,7 @@ namespace Apache.NMS.ActiveMQ.Test
             // Test initialize - Fills in DB with data to send.
             PrepareDatabase();
 
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();
@@ -292,7 +292,7 @@ namespace Apache.NMS.ActiveMQ.Test
         [Test]
         public void TestIterativeTransactedProduceWithDBDelete()
         {
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 connection.ExceptionListener += this.OnException;
                 connection.Start();

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcTransactionsTestSupport.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcTransactionsTestSupport.cs?rev=1538073&r1=1538072&r2=1538073&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcTransactionsTestSupport.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcTransactionsTestSupport.cs
Fri Nov  1 22:22:34 2013
@@ -48,7 +48,7 @@ namespace Apache.NMS.ActiveMQ.Test
     {
         protected const int MSG_COUNT = 5;
         protected string nonExistantPath;
-        protected NetTxConnectionFactory factory;
+        protected NetTxConnectionFactory dtcFactory;
         
         private ITrace oldTracer;
 
@@ -326,7 +326,7 @@ namespace Apache.NMS.ActiveMQ.Test
 
         protected void VerifyBrokerQueueCount(int expectedCount, string connectionUri)
         {           
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 // check messages are present in the queue
                 using (INetTxSession session = connection.CreateNetTxSession())
@@ -398,7 +398,7 @@ namespace Apache.NMS.ActiveMQ.Test
 
         protected void VerifyBrokerHasMessagesInQueue(string connectionURI)
         {
-            using (INetTxConnection connection = factory.CreateNetTxConnection())
+            using (INetTxConnection connection = dtcFactory.CreateNetTxConnection())
             {
                 // check messages are present in the queue
                 using (INetTxSession session = connection.CreateNetTxSession())



Mime
View raw message