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
e00fa9e3
Commit
e00fa9e3
authored
Jul 10, 2018
by
Nick Craver
Committed by
Nick Craver
Jul 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more logging to BasicOps.TestQuit
parent
a44439df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
BasicOps.cs
StackExchange.Redis.Tests/BasicOps.cs
+7
-2
No files found.
StackExchange.Redis.Tests/BasicOps.cs
View file @
e00fa9e3
...
@@ -286,16 +286,21 @@ public void GetWithExpiryWrongTypeSync()
...
@@ -286,16 +286,21 @@ public void GetWithExpiryWrongTypeSync()
[
Fact
]
[
Fact
]
public
void
TestQuit
()
public
void
TestQuit
()
{
{
string
Time
()
=>
DateTime
.
UtcNow
.
ToString
(
"HH:mm:ss.fff"
);
SetExpectedAmbientFailureCount
(
1
);
SetExpectedAmbientFailureCount
(
1
);
using
(
var
muxer
=
Create
(
allowAdmin
:
true
))
using
(
var
muxer
=
Create
(
allowAdmin
:
true
))
{
{
muxer
.
ConnectionFailed
+=
(
_
,
__
)
=>
Log
(
"{0}: Connection Failed"
,
Time
());
muxer
.
ConnectionRestored
+=
(
_
,
__
)
=>
Log
(
"{0}: Connection Restored"
,
Time
());
var
db
=
muxer
.
GetDatabase
();
var
db
=
muxer
.
GetDatabase
();
string
key
=
Guid
.
NewGuid
().
ToString
();
string
key
=
Guid
.
NewGuid
().
ToString
();
db
.
KeyDelete
(
key
,
CommandFlags
.
FireAndForget
);
db
.
KeyDelete
(
key
,
CommandFlags
.
FireAndForget
);
db
.
StringSet
(
key
,
key
,
flags
:
CommandFlags
.
FireAndForget
);
db
.
StringSet
(
key
,
key
,
flags
:
CommandFlags
.
FireAndForget
);
GetServer
(
muxer
).
Execute
(
"QUIT"
,
null
,
CommandFlags
.
FireAndForget
);
Log
(
"{0}: Issuing QUIT"
,
Time
());
GetServer
(
muxer
).
Execute
(
"QUIT"
,
null
);
var
watch
=
Stopwatch
.
StartNew
();
var
watch
=
Stopwatch
.
StartNew
();
Assert
.
Throws
<
RedisConnectionException
>(()
=>
db
.
Ping
(
));
Assert
.
Throws
<
RedisConnectionException
>(()
=>
Log
(
"Ping time: "
+
db
.
Ping
().
ToString
()
));
watch
.
Stop
();
watch
.
Stop
();
Log
(
"Time to notice quit: {0}ms (any order)"
,
watch
.
ElapsedMilliseconds
);
Log
(
"Time to notice quit: {0}ms (any order)"
,
watch
.
ElapsedMilliseconds
);
Thread
.
Sleep
(
20
);
Thread
.
Sleep
(
20
);
...
...
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