|
1 | | -using EasyCaching.Core; |
2 | | -using EasyCaching.Core.Configurations; |
3 | | -using EasyCaching.Core.DistributedLock; |
4 | | -using EasyCaching.Redis; |
5 | | -using EasyCaching.Redis.DistributedLock; |
6 | | -using Google.Protobuf.WellKnownTypes; |
7 | | -using Microsoft.Extensions.DependencyInjection; |
8 | | -using Newtonsoft.Json; |
9 | | -using Xunit.Abstractions; |
| 1 | +//using EasyCaching.Core; |
| 2 | +//using EasyCaching.Core.Configurations; |
| 3 | +//using EasyCaching.Core.DistributedLock; |
| 4 | +//using EasyCaching.Redis; |
| 5 | +//using EasyCaching.Redis.DistributedLock; |
| 6 | +//using Google.Protobuf.WellKnownTypes; |
| 7 | +//using Microsoft.Extensions.DependencyInjection; |
| 8 | +//using Newtonsoft.Json; |
| 9 | +//using Xunit.Abstractions; |
10 | 10 |
|
11 | | -namespace EasyCaching.UnitTests.DistributedLock |
12 | | -{ |
13 | | - public class EtcdLockTest : BaseDistributedLockTest |
14 | | - { |
15 | | - private static readonly IDistributedLockFactory Factory = new ServiceCollection() |
16 | | - .AddLogging() |
17 | | - .AddEasyCaching(option=>option.UseEtcd(options => |
18 | | - { |
19 | | - options.Address = "http://127.0.0.1:2379"; |
20 | | - options.Timeout = 3000; |
21 | | - options.LockMs = 10000; |
22 | | - options.SerializerName = "json"; |
23 | | - }).WithJson(jsonSerializerSettingsConfigure: x => |
24 | | - { |
25 | | - x.TypeNameHandling = Newtonsoft.Json.TypeNameHandling.None; |
26 | | - x.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; |
27 | | - }, "json").UseEtcdLock()) |
28 | | - .BuildServiceProvider() |
29 | | - .GetService<RedisLockFactory>(); |
| 11 | +//namespace EasyCaching.UnitTests.DistributedLock |
| 12 | +//{ |
| 13 | +// public class EtcdLockTest : BaseDistributedLockTest |
| 14 | +// { |
| 15 | +// private static readonly IDistributedLockFactory Factory = new ServiceCollection() |
| 16 | +// .AddLogging() |
| 17 | +// .AddEasyCaching(option=>option.UseEtcd(options => |
| 18 | +// { |
| 19 | +// options.Address = "http://127.0.0.1:2379"; |
| 20 | +// options.Timeout = 3000; |
| 21 | +// options.LockMs = 10000; |
| 22 | +// options.SerializerName = "json"; |
| 23 | +// }).WithJson(jsonSerializerSettingsConfigure: x => |
| 24 | +// { |
| 25 | +// x.TypeNameHandling = Newtonsoft.Json.TypeNameHandling.None; |
| 26 | +// x.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; |
| 27 | +// }, "json").UseEtcdLock()) |
| 28 | +// .BuildServiceProvider() |
| 29 | +// .GetService<RedisLockFactory>(); |
30 | 30 |
|
31 | | - public EtcdLockTest(ITestOutputHelper output) : base(EasyCachingConstValue.DefaultEtcdName, Factory, output) { } |
32 | | - } |
33 | | -} |
| 31 | +// public EtcdLockTest(ITestOutputHelper output) : base(EasyCachingConstValue.DefaultEtcdName, Factory, output) { } |
| 32 | +// } |
| 33 | +//} |
0 commit comments