public void NoQuorumDoesNotObtainLock() { var l = Redlock.TryLock("r", "n", TimeSpan.FromSeconds(1), _noQuorum, _log); Assert.Null(l); Assert.NotEmpty(_log.Logs.Where(x => x.Exception != null && x.LogLevel == LogLevel.Error)); }
public void Sequential() { for (var i = 0; i < 10; i++) { var l = Redlock.TryLock("r", i.ToString(), TimeSpan.FromSeconds(10), _5Inst, _log); Assert.NotNull(l); l !.Value.Dispose(); } }