Skip to content

Commit b791ce4

Browse files
committed
updated tests
1 parent 72d5c6c commit b791ce4

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tests/Foundatio.Redis.Tests/Locks/RedisLockTests.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,21 @@ protected RedisLockTests(ITestOutputHelper output, RedisProtocol? protocol) : ba
3737
_messageBus = new RedisMessageBus(o => o.Subscriber(muxer.GetSubscriber()).Topic(_topic).LoggerFactory(Log));
3838
}
3939

40-
protected override ILockProvider GetThrottlingLockProvider(int maxHits, TimeSpan period)
40+
protected override ILockProvider? GetThrottlingLockProvider(int maxHits, TimeSpan period)
4141
{
42+
var muxer = SharedConnection.GetMuxer(Log, Protocol);
43+
if (muxer is null)
44+
return null;
45+
4246
return new ThrottlingLockProvider(_cache, maxHits, period, null, null, Log);
4347
}
4448

45-
protected override ILockProvider GetLockProvider()
49+
protected override ILockProvider? GetLockProvider()
4650
{
51+
var muxer = SharedConnection.GetMuxer(Log, Protocol);
52+
if (muxer is null)
53+
return null;
54+
4755
return new CacheLockProvider(_cache, _messageBus, null, null, Log);
4856
}
4957

0 commit comments

Comments
 (0)