Commit 59a9e18c authored by Marc Gravell's avatar Marc Gravell

make UseSharedConnection available in TesstConfig.json; defaults to true

parent 8611ed9b
......@@ -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())
......
......@@ -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; }
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment