Commit 0651c222 authored by Nick Craver's avatar Nick Craver

Fix exception factory debug tests

parent b761275e
...@@ -28,7 +28,7 @@ public void NullSnapshot() ...@@ -28,7 +28,7 @@ public void NullSnapshot()
} }
#if DEBUG // needs debug connection features #if DEBUG // needs debug connection features
[Fact] [Fact]
public void MultipleEndpointsThrowAggregateException() public void MultipleEndpointsThrowConnectionException()
{ {
try try
{ {
...@@ -43,14 +43,10 @@ public void MultipleEndpointsThrowAggregateException() ...@@ -43,14 +43,10 @@ public void MultipleEndpointsThrowAggregateException()
} }
var ex = ExceptionFactory.NoConnectionAvailable(true, true, new RedisCommand(), null, null, muxer.GetServerSnapshot()); var ex = ExceptionFactory.NoConnectionAvailable(true, true, new RedisCommand(), null, null, muxer.GetServerSnapshot());
Assert.IsType<RedisConnectionException>(ex); var outer = Assert.IsType<RedisConnectionException>(ex);
Assert.IsType<AggregateException>(ex.InnerException); Assert.Equal(ConnectionFailureType.UnableToResolvePhysicalConnection, outer.FailureType);
var aggException = (AggregateException)ex.InnerException; var inner = Assert.IsType<RedisConnectionException>(outer.InnerException);
Assert.Equal(2, aggException.InnerExceptions.Count); Assert.Equal(ConnectionFailureType.SocketFailure, inner.FailureType);
for (int i = 0; i < aggException.InnerExceptions.Count; i++)
{
Assert.Equal(ConnectionFailureType.SocketFailure, ((RedisConnectionException)aggException.InnerExceptions[i]).FailureType);
}
} }
} }
finally finally
......
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