diff options
-rw-r--r-- | dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs | 47 | ||||
-rw-r--r-- | dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs | 2 |
2 files changed, 20 insertions, 29 deletions
diff --git a/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs b/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs index 0829b62e39..b2eecfc423 100644 --- a/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs +++ b/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs @@ -215,42 +215,33 @@ namespace Qpid.Client.Tests.failover _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'"; + [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 + "]"); - // _log.Info("url = [" + defaultUrl + "]"); + ConnectionInfo connectionInfo = QpidConnectionInfo.FromUrl(defaultUrl); - // _log.Info("connection url = [" + new AMQConnectionInfo(defaultUrl) + "]"); + _log.Info("connection url = [" + connectionInfo + "]"); - // DoFailoverTxTest(new AMQConnectionInfo(defaultUrl)); - // } catch (Exception e) { - // _log.Error("test failed", e); - // } - //} + DoFailoverTxTest(connectionInfo); + } } } diff --git a/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs b/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs index 4437290f5c..0639d66028 100644 --- a/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs +++ b/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs @@ -26,7 +26,7 @@ namespace Qpid.Client.Handler { 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; |