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
965453e2
Commit
965453e2
authored
Jul 21, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix and light up Cluster.MovedProfiling
This is no lonkger flaky...light the test up for Release as well.
parent
b7f18015
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
Cluster.cs
StackExchange.Redis.Tests/Cluster.cs
+5
-8
No files found.
StackExchange.Redis.Tests/Cluster.cs
View file @
965453e2
...
...
@@ -664,30 +664,28 @@ public void GroupedQueriesWork()
var
all
=
grouped
.
SelectMany
(
grp
=>
{
var
grpKeys
=
grp
.
ToArray
();
var
values
=
db
.
StringGet
(
grpKeys
);
return
Enumerable
.
Zip
(
grpKeys
,
values
,
(
key
,
val
)
=>
new
{
key
,
val
});
return
grpKeys
.
Zip
(
values
,
(
key
,
val
)
=>
new
{
key
,
val
});
}).
ToDictionary
(
x
=>
x
.
key
,
x
=>
x
.
val
);
Assert
.
Equal
(
keys
.
Length
,
all
.
Count
);
}
}
#if DEBUG
[
Fact
]
public
void
MovedProfiling
()
{
const
string
Key
=
"redirected-key"
;
var
Key
=
Me
()
;
const
string
Value
=
"redirected-value"
;
var
profiler
=
new
TestProfiler
();
var
profiler
=
new
ProfilingSession
();
using
(
var
conn
=
Create
())
{
conn
.
RegisterProfiler
(
profiler
);
conn
.
RegisterProfiler
(
()
=>
profiler
);
var
endpoints
=
conn
.
GetEndPoints
();
var
servers
=
endpoints
.
Select
(
e
=>
conn
.
GetServer
(
e
));
conn
.
BeginProfiling
(
profiler
.
MyContext
);
var
db
=
conn
.
GetDatabase
();
db
.
KeyDelete
(
Key
);
db
.
StringSet
(
Key
,
Value
);
...
...
@@ -707,7 +705,7 @@ public void MovedProfiling()
string
b
=
(
string
)
conn
.
GetServer
(
wrongMasterNode
.
EndPoint
).
Execute
(
"GET"
,
Key
);
Assert
.
Equal
(
Value
,
b
);
// wrong master, allow redirect
var
msgs
=
conn
.
FinishProfiling
(
profiler
.
MyContext
).
ToList
();
var
msgs
=
profiler
.
FinishProfiling
(
).
ToList
();
// verify that things actually got recorded properly, and the retransmission profilings are connected as expected
{
...
...
@@ -754,6 +752,5 @@ public void MovedProfiling()
}
}
}
#endif
}
}
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