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
1fcf91d6
Commit
1fcf91d6
authored
Jul 31, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
polishing
parent
5fb3279a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
16 deletions
+3
-16
ConnectionFailedErrors.cs
StackExchange.Redis.Tests/ConnectionFailedErrors.cs
+3
-1
PhysicalConnection.cs
...kExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
+0
-15
No files found.
StackExchange.Redis.Tests/ConnectionFailedErrors.cs
View file @
1fcf91d6
...
@@ -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
);
...
...
StackExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
View file @
1fcf91d6
...
@@ -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
(
...
...
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