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
59a9e18c
Commit
59a9e18c
authored
Aug 31, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make UseSharedConnection available in TesstConfig.json; defaults to true
parent
8611ed9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletion
+4
-1
BasicOps.cs
tests/StackExchange.Redis.Tests/BasicOps.cs
+1
-0
TestConfig.cs
tests/StackExchange.Redis.Tests/Helpers/TestConfig.cs
+1
-0
SharedConnectionFixture.cs
tests/StackExchange.Redis.Tests/SharedConnectionFixture.cs
+2
-1
No files found.
tests/StackExchange.Redis.Tests/BasicOps.cs
View file @
59a9e18c
...
...
@@ -402,6 +402,7 @@ private void Incr(IDatabase database, RedisKey key, int delta, ref int total)
[
Fact
]
public
void
ShouldUseSharedMuxer
()
{
Writer
.
WriteLine
(
$"Shared:
{
SharedFixtureAvailable
}
"
);
if
(
SharedFixtureAvailable
)
{
using
(
var
a
=
Create
())
...
...
tests/StackExchange.Redis.Tests/Helpers/TestConfig.cs
View file @
59a9e18c
...
...
@@ -43,6 +43,7 @@ static TestConfig()
public
class
Config
{
public
bool
UseSharedConnection
{
get
;
set
;
}
=
true
;
public
bool
RunLongRunning
{
get
;
set
;
}
public
bool
LogToConsole
{
get
;
set
;
}
...
...
tests/StackExchange.Redis.Tests/SharedConnectionFixture.cs
View file @
59a9e18c
...
...
@@ -12,7 +12,7 @@ namespace StackExchange.Redis.Tests
{
public
class
SharedConnectionFixture
:
IDisposable
{
public
bool
IsEnabled
=>
true
;
// set to false to disable globally
public
bool
IsEnabled
{
get
;
}
public
const
string
Key
=
"Shared Muxer"
;
private
readonly
ConnectionMultiplexer
_actualConnection
;
...
...
@@ -21,6 +21,7 @@ public class SharedConnectionFixture : IDisposable
public
SharedConnectionFixture
()
{
IsEnabled
=
TestConfig
.
Current
.
UseSharedConnection
;
Configuration
=
TestBase
.
GetDefaultConfiguration
();
_actualConnection
=
TestBase
.
CreateDefault
(
output
:
null
,
...
...
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