Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
07455ae0
Commit
07455ae0
authored
Aug 08, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fine, proper debug
parent
9ff0d203
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
ExceptionFactoryTests.cs
StackExchange.Redis.Tests/ExceptionFactoryTests.cs
+12
-12
No files found.
StackExchange.Redis.Tests/ExceptionFactoryTests.cs
View file @
07455ae0
...
@@ -28,8 +28,8 @@ public void NullSnapshot()
...
@@ -28,8 +28,8 @@ public void NullSnapshot()
Assert
.
Null
(
ex
.
InnerException
);
Assert
.
Null
(
ex
.
InnerException
);
}
}
#if DEBUG
[
Fact
]
[
Fact
]
[
Conditional
(
"DEBUG"
)]
public
void
MultipleEndpointsThrowConnectionException
()
public
void
MultipleEndpointsThrowConnectionException
()
{
{
try
try
...
@@ -58,7 +58,7 @@ public void MultipleEndpointsThrowConnectionException()
...
@@ -58,7 +58,7 @@ public void MultipleEndpointsThrowConnectionException()
}
}
[
Fact
]
[
Fact
]
public
void
NullInnerExceptionForMultipleEndpointsWithNoLastException
()
public
void
ServerTakesPrecendenceOverSnapshot
()
{
{
try
try
{
{
...
@@ -66,9 +66,13 @@ public void NullInnerExceptionForMultipleEndpointsWithNoLastException()
...
@@ -66,9 +66,13 @@ public void NullInnerExceptionForMultipleEndpointsWithNoLastException()
{
{
var
conn
=
muxer
.
GetDatabase
();
var
conn
=
muxer
.
GetDatabase
();
muxer
.
AllowConnect
=
false
;
muxer
.
AllowConnect
=
false
;
var
ex
=
ExceptionFactory
.
NoConnectionAvailable
(
true
,
true
,
new
RedisCommand
(),
null
,
null
,
muxer
.
GetServerSnapshot
());
muxer
.
GetServer
(
muxer
.
GetEndPoints
()[
0
]).
SimulateConnectionFailure
();
var
ex
=
ExceptionFactory
.
NoConnectionAvailable
(
true
,
true
,
new
RedisCommand
(),
null
,
muxer
.
GetServerSnapshot
()[
0
],
muxer
.
GetServerSnapshot
());
Assert
.
IsType
<
RedisConnectionException
>(
ex
);
Assert
.
IsType
<
RedisConnectionException
>(
ex
);
Assert
.
Null
(
ex
.
InnerException
);
Assert
.
IsType
<
RedisConnectionException
>(
ex
.
InnerException
);
Assert
.
Equal
(
ex
.
InnerException
,
muxer
.
GetServerSnapshot
()[
0
].
LastException
);
}
}
}
}
finally
finally
...
@@ -76,10 +80,10 @@ public void NullInnerExceptionForMultipleEndpointsWithNoLastException()
...
@@ -76,10 +80,10 @@ public void NullInnerExceptionForMultipleEndpointsWithNoLastException()
ClearAmbientFailures
();
ClearAmbientFailures
();
}
}
}
}
#endif
[
Fact
]
[
Fact
]
[
Conditional
(
"DEBUG"
)]
public
void
NullInnerExceptionForMultipleEndpointsWithNoLastException
()
public
void
ServerTakesPrecendenceOverSnapshot
()
{
{
try
try
{
{
...
@@ -87,13 +91,9 @@ public void ServerTakesPrecendenceOverSnapshot()
...
@@ -87,13 +91,9 @@ public void ServerTakesPrecendenceOverSnapshot()
{
{
var
conn
=
muxer
.
GetDatabase
();
var
conn
=
muxer
.
GetDatabase
();
muxer
.
AllowConnect
=
false
;
muxer
.
AllowConnect
=
false
;
var
ex
=
ExceptionFactory
.
NoConnectionAvailable
(
true
,
true
,
new
RedisCommand
(),
null
,
null
,
muxer
.
GetServerSnapshot
());
muxer
.
GetServer
(
muxer
.
GetEndPoints
()[
0
]).
SimulateConnectionFailure
();
var
ex
=
ExceptionFactory
.
NoConnectionAvailable
(
true
,
true
,
new
RedisCommand
(),
null
,
muxer
.
GetServerSnapshot
()[
0
],
muxer
.
GetServerSnapshot
());
Assert
.
IsType
<
RedisConnectionException
>(
ex
);
Assert
.
IsType
<
RedisConnectionException
>(
ex
);
Assert
.
IsType
<
RedisConnectionException
>(
ex
.
InnerException
);
Assert
.
Null
(
ex
.
InnerException
);
Assert
.
Equal
(
ex
.
InnerException
,
muxer
.
GetServerSnapshot
()[
0
].
LastException
);
}
}
}
}
finally
finally
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment