Commit 1fcf91d6 authored by Marc Gravell's avatar Marc Gravell

polishing

parent 5fb3279a
...@@ -70,7 +70,9 @@ public async Task AuthenticationFailureError() ...@@ -70,7 +70,9 @@ public async Task AuthenticationFailureError()
muxer.ConnectionFailed += (object sender, ConnectionFailedEventArgs e) => muxer.ConnectionFailed += (object sender, ConnectionFailedEventArgs e) =>
Assert.Equal(ConnectionFailureType.AuthenticationFailure, e.FailureType); Assert.Equal(ConnectionFailureType.AuthenticationFailure, e.FailureType);
var ex = Assert.Throws<RedisConnectionException>(() => muxer.GetDatabase().Ping()); var ex = Assert.Throws<RedisConnectionException>(() => muxer.GetDatabase().Ping());
var rde = (RedisConnectionException)ex.InnerException;
Assert.NotNull(ex.InnerException);
var rde = Assert.IsType<RedisConnectionException>(ex.InnerException);
Assert.Equal(CommandStatus.WaitingToBeSent, ex.CommandStatus); Assert.Equal(CommandStatus.WaitingToBeSent, ex.CommandStatus);
Assert.Equal(ConnectionFailureType.AuthenticationFailure, rde.FailureType); Assert.Equal(ConnectionFailureType.AuthenticationFailure, rde.FailureType);
Assert.Equal("Error: NOAUTH Authentication required. Verify if the Redis password provided is correct.", rde.InnerException.Message); Assert.Equal("Error: NOAUTH Authentication required. Verify if the Redis password provided is correct.", rde.InnerException.Message);
......
...@@ -26,21 +26,6 @@ internal sealed partial class PhysicalConnection : IDisposable ...@@ -26,21 +26,6 @@ internal sealed partial class PhysicalConnection : IDisposable
private const int DefaultRedisDatabaseCount = 16; private const int DefaultRedisDatabaseCount = 16;
//private static readonly AsyncCallback endRead = result =>
//{
// PhysicalConnection physical;
// if (result.CompletedSynchronously || (physical = result.AsyncState as PhysicalConnection) == null) return;
// try
// {
// physical.Multiplexer.Trace("Completed asynchronously: processing in callback", physical.physicalName);
// if (physical.EndReading(result)) physical.BeginReading();
// }
// catch (Exception ex)
// {
// physical.RecordConnectionFailed(ConnectionFailureType.InternalFailure, ex);
// }
//};
private static readonly CommandBytes message = "message", pmessage = "pmessage"; private static readonly CommandBytes message = "message", pmessage = "pmessage";
private static readonly Message[] ReusableChangeDatabaseCommands = Enumerable.Range(0, DefaultRedisDatabaseCount).Select( private static readonly Message[] ReusableChangeDatabaseCommands = Enumerable.Range(0, DefaultRedisDatabaseCount).Select(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment