diff --git a/CHANGELOG.md b/CHANGELOG.md index f69bff07..c3879168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ -### 6.4.2 -- Fix README links in NuGet package. +### 6.4.3 +- Fix README links displayed on the NuGet package page. ### 6.4.0 - **Introduced a new configuration API replacing the builder pattern**: diff --git a/src/ConfigCat.Client.Tests/ConfigCacheTests.cs b/src/ConfigCat.Client.Tests/ConfigCacheTests.cs index 96d74e49..a65c612f 100644 --- a/src/ConfigCat.Client.Tests/ConfigCacheTests.cs +++ b/src/ConfigCat.Client.Tests/ConfigCacheTests.cs @@ -1,4 +1,5 @@ -using System.Threading; +using System.Net.Http; +using System.Threading; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; @@ -10,6 +11,7 @@ namespace ConfigCat.Client.Tests public class ConfigCacheTests { private const string SDKKEY = "PKDVCLf-Hq-h-kCzMp-L7Q/psuH7BGHoUmdONrzzUOY7A"; + private static readonly HttpClientHandler sharedHandler = new HttpClientHandler(); [DataRow(true)] [DataRow(false)] @@ -33,12 +35,14 @@ public void ConfigCache_Override_AutoPoll_Works(bool useNewCreateApi) options.Logger = new ConsoleLogger(LogLevel.Debug); options.PollingMode = PollingModes.AutoPoll(); options.ConfigCache = configCacheMock.Object; + options.HttpClientHandler = sharedHandler; }) : ConfigCatClientBuilder .Initialize(SDKKEY) .WithLogger(new ConsoleLogger(LogLevel.Debug)) .WithAutoPoll() .WithConfigCache(configCacheMock.Object) + .WithHttpClientHandler(sharedHandler) .Create(); var actual = client.GetValue("stringDefaultCat", "N/A"); @@ -70,8 +74,13 @@ public void ConfigCache_Override_ManualPoll_Works(bool useNewCreateApi) options.Logger = new ConsoleLogger(LogLevel.Debug); options.PollingMode = PollingModes.ManualPoll; options.ConfigCache = configCacheMock.Object; + options.HttpClientHandler = sharedHandler; }) - : ConfigCatClientBuilder.Initialize(SDKKEY).WithManualPoll().WithConfigCache(configCacheMock.Object).Create(); + : ConfigCatClientBuilder.Initialize(SDKKEY) + .WithManualPoll() + .WithConfigCache(configCacheMock.Object) + .WithHttpClientHandler(sharedHandler) + .Create(); configCacheMock.Verify(c => c.SetAsync(It.IsAny(), It.IsAny()), Times.Never); configCacheMock.Verify(c => c.GetAsync(It.IsAny(), CancellationToken.None), Times.Never); @@ -111,8 +120,13 @@ public void ConfigCache_Override_LazyLoad_Works(bool useNewCreateApi) options.Logger = new ConsoleLogger(LogLevel.Debug); options.PollingMode = PollingModes.LazyLoad(); options.ConfigCache = configCacheMock.Object; + options.HttpClientHandler = sharedHandler; }) - : ConfigCatClientBuilder.Initialize(SDKKEY).WithLazyLoad().WithConfigCache(configCacheMock.Object).Create(); + : ConfigCatClientBuilder.Initialize(SDKKEY) + .WithLazyLoad() + .WithConfigCache(configCacheMock.Object) + .WithHttpClientHandler(sharedHandler) + .Create(); var actual = client.GetValue("stringDefaultCat", "N/A"); Assert.AreEqual("Cat", actual); diff --git a/src/ConfigCat.Client.Tests/SynchronizationContextDeadlockTests.cs b/src/ConfigCat.Client.Tests/SynchronizationContextDeadlockTests.cs index 066174ec..8aa97572 100644 --- a/src/ConfigCat.Client.Tests/SynchronizationContextDeadlockTests.cs +++ b/src/ConfigCat.Client.Tests/SynchronizationContextDeadlockTests.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Reflection; using System.Threading.Tasks; +using System.Net.Http; #pragma warning disable CS0618 // Type or member is obsolete namespace ConfigCat.Client.Tests @@ -13,6 +14,7 @@ namespace ConfigCat.Client.Tests public class SynchronizationContextDeadlockTests { private const string SDKKEY = "PKDVCLf-Hq-h-kCzMp-L7Q/psuH7BGHoUmdONrzzUOY7A"; + private static readonly HttpClientHandler sharedHandler = new HttpClientHandler(); private readonly Mock syncContextMock; @@ -52,11 +54,13 @@ public void AutoPollDeadLockCheck(bool useNewCreateApi) { options.SdkKey = SDKKEY; options.Logger = new ConsoleLogger(LogLevel.Off); + options.HttpClientHandler = sharedHandler; }) : new ConfigCatClient(new AutoPollConfiguration { SdkKey = SDKKEY, - Logger = new ConsoleLogger(LogLevel.Off) + Logger = new ConsoleLogger(LogLevel.Off), + HttpClientHandler = sharedHandler, }); ClientDeadlockCheck(client); @@ -72,11 +76,13 @@ public void ManualPollDeadLockCheck(bool useNewCreateApi) { options.SdkKey = SDKKEY; options.Logger = new ConsoleLogger(LogLevel.Off); + options.HttpClientHandler = sharedHandler; }) : new ConfigCatClient(new ManualPollConfiguration { SdkKey = SDKKEY, - Logger = new ConsoleLogger(LogLevel.Off) + Logger = new ConsoleLogger(LogLevel.Off), + HttpClientHandler = sharedHandler, }); ClientDeadlockCheck(client); @@ -92,11 +98,13 @@ public void LazyLoadDeadLockCheck(bool useNewCreateApi) { options.SdkKey = SDKKEY; options.Logger = new ConsoleLogger(LogLevel.Off); + options.HttpClientHandler = sharedHandler; }) : new ConfigCatClient(new LazyLoadConfiguration { SdkKey = SDKKEY, - Logger = new ConsoleLogger(LogLevel.Off) + Logger = new ConsoleLogger(LogLevel.Off), + HttpClientHandler = sharedHandler, }); ClientDeadlockCheck(client); diff --git a/src/ConfigCatClient/ConfigCatClient.csproj b/src/ConfigCatClient/ConfigCatClient.csproj index 6b149ab1..2b7fec0c 100644 --- a/src/ConfigCatClient/ConfigCatClient.csproj +++ b/src/ConfigCatClient/ConfigCatClient.csproj @@ -11,7 +11,7 @@ ConfigCat ConfigCat MIT - https://github.com/ConfigCat/.net-sdk + https://configcat.com/docs/sdk-reference/csharp https://github.com/ConfigCat/.net-sdk git latest