You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by st...@apache.org on 2006/12/19 23:49:09 UTC

svn commit: r488844 - in /incubator/qpid/trunk/qpid/dotnet: Qpid.Client.Tests/failover/FailoverTxTest.cs Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs

Author: steshaw
Date: Tue Dec 19 14:49:08 2006
New Revision: 488844

URL: http://svn.apache.org/viewvc?view=rev&rev=488844
Log:
Fixed warning.
FailoverTxTest now using connection URI for configuration.

Modified:
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs?view=diff&rev=488844&r1=488843&r2=488844
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs Tue Dec 19 14:49:08 2006
@@ -215,42 +215,33 @@
             _log.Info("failoverComplete() called");
         }
 
-        [Test]
+//        [Test]
         public void TestWithBasicInfo()
         {
             Console.WriteLine("TestWithBasicInfo");
             Console.WriteLine(".NET Framework version: " + RuntimeEnvironment.GetSystemVersion());
-//            try
-//            {
-                QpidConnectionInfo connectionInfo = new QpidConnectionInfo();
-                
-                connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5672, false));
-                connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5673, false));
-                
-                DoFailoverTxTest(connectionInfo);
-//            }
-//            catch (Exception e)
-//            {
-//                _log.Error("Exception caught", e);
-//            }
+            QpidConnectionInfo connectionInfo = new QpidConnectionInfo();
+
+            connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5672, false));
+            connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5673, false));
+
+            DoFailoverTxTest(connectionInfo);
         }
 
-        //[Test]
-        //public void runTestWithUrl()
-        //{
-        //    try {
-        //        String clientId = "failover" + DateTime.Now.Ticks;
-        //        string defaultUrl = "amqp://guest:guest@" + clientId + "/test" +
-        //                    "?brokerlist='tcp://localhost:5672;tcp://localhost:5673'&failover='roundrobin'";
-
-        //        _log.Info("url = [" + defaultUrl + "]");
-
-        //        _log.Info("connection url = [" + new AMQConnectionInfo(defaultUrl) + "]");
-
-        //        DoFailoverTxTest(new AMQConnectionInfo(defaultUrl));
-        //    } catch (Exception e) {
-        //        _log.Error("test failed", e);
-        //    }
-        //}
+        [Test]
+        public void runTestWithUrl()
+        {
+            String clientId = "failover" + DateTime.Now.Ticks;
+            string defaultUrl = "amqp://guest:guest@" + clientId + "/test" +
+                    "?brokerlist='tcp://localhost:5672;tcp://localhost:5673'&failover='roundrobin'";
+
+            _log.Info("url = [" + defaultUrl + "]");
+
+            ConnectionInfo connectionInfo = QpidConnectionInfo.FromUrl(defaultUrl);
+
+            _log.Info("connection url = [" + connectionInfo + "]");
+
+            DoFailoverTxTest(connectionInfo);
+        }
     }
 }

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs?view=diff&rev=488844&r1=488843&r2=488844
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs Tue Dec 19 14:49:08 2006
@@ -26,7 +26,7 @@
 {
     public class ConnectionRedirectMethodHandler : IStateAwareMethodListener
     {
-        private static readonly ILog _logger = LogManager.GetLogger(typeof(ConnectionRedirectMethodHandler));
+//        private static readonly ILog _logger = LogManager.GetLogger(typeof(ConnectionRedirectMethodHandler));
 
         private const int DEFAULT_REDIRECT_PORT = 5672;