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
9cfa0435
Commit
9cfa0435
authored
Apr 08, 2020
by
mgravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
need to allow the GetServer API to expose KEYS/SCAN, which is supported
parent
8c62c8f7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ConnectionMultiplexer.cs
src/StackExchange.Redis/ConnectionMultiplexer.cs
+0
-1
RedisClusterProxyTests.cs
tests/StackExchange.Redis.Tests/RedisClusterProxyTests.cs
+4
-3
No files found.
src/StackExchange.Redis/ConnectionMultiplexer.cs
View file @
9cfa0435
...
...
@@ -1333,7 +1333,6 @@ public IServer GetServer(EndPoint endpoint, object asyncState = null)
if
(
endpoint
==
null
)
throw
new
ArgumentNullException
(
nameof
(
endpoint
));
switch
(
RawConfig
.
Proxy
)
{
case
Proxy
.
RedisClusterProxy
:
case
Proxy
.
Twemproxy
:
throw
new
NotSupportedException
(
$"The server API is not available via
{
RawConfig
.
Proxy
}
"
);
}
...
...
tests/StackExchange.Redis.Tests/RedisClusterProxyTests.cs
View file @
9cfa0435
...
...
@@ -23,10 +23,11 @@ public void CanConnectToClusterProxy()
Assert
.
Equal
(
expected
,
actual
);
// check it knows that we're dealing with a cluster
var
ex
=
Assert
.
Throws
<
NotSupportedException
>(()
=>
conn
.
GetServer
(
"abc"
));
Assert
.
Equal
(
"The server API is not available via RedisClusterProxy"
,
ex
.
Message
);
var
server
=
conn
.
GetServer
(
conn
.
GetEndPoints
()[
0
]);
Assert
.
Equal
(
ServerType
.
RedisClusterProxy
,
server
.
ServerType
);
_
=
server
.
Echo
(
"abc"
);
ex
=
Assert
.
Throws
<
NotSupportedException
>(()
=>
conn
.
GetSubscriber
(
"abc"
));
var
ex
=
Assert
.
Throws
<
NotSupportedException
>(()
=>
conn
.
GetSubscriber
(
"abc"
));
Assert
.
Equal
(
"The pub/sub API is not available via RedisClusterProxy"
,
ex
.
Message
);
// test a script
...
...
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