Skip to content

Fix format #647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT license.
//
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.Core.Pipeline;
using Azure.Data.AppConfiguration;
using Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureKeyVault;
using Microsoft.Extensions.Configuration.AzureAppConfiguration.Extensions;
Expand All @@ -11,7 +11,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http;
using System.Threading.Tasks;

namespace Microsoft.Extensions.Configuration.AzureAppConfiguration
Expand All @@ -25,7 +25,7 @@ public class AzureAppConfigurationOptions
private const int MaxRetries = 2;
private static readonly TimeSpan MaxRetryDelay = TimeSpan.FromMinutes(1);
private static readonly TimeSpan NetworkTimeout = TimeSpan.FromSeconds(10);
private static readonly KeyValueSelector DefaultQuery = new KeyValueSelector { KeyFilter = KeyFilter.Any, LabelFilter = LabelFilter.Null };
private static readonly KeyValueSelector DefaultQuery = new KeyValueSelector { KeyFilter = KeyFilter.Any, LabelFilter = LabelFilter.Null };

private List<KeyValueWatcher> _individualKvWatchers = new List<KeyValueWatcher>();
private List<KeyValueWatcher> _ffWatchers = new List<KeyValueWatcher>();
Expand Down Expand Up @@ -514,9 +514,9 @@ private static ConfigurationClientOptions GetDefaultClientOptions()
clientOptions.Retry.Mode = RetryMode.Exponential;
clientOptions.AddPolicy(new UserAgentHeaderPolicy(), HttpPipelinePosition.PerCall);
clientOptions.Transport = new HttpClientTransport(new HttpClient()
{
{
Timeout = NetworkTimeout
});
});

return clientOptions;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Azure.Data.AppConfiguration;
using Azure;
using Azure;
using Azure.Data.AppConfiguration;
using System.Collections.Generic;

namespace Microsoft.Extensions.Configuration.AzureAppConfiguration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Azure.Data.AppConfiguration;
using Azure;
using Azure;
using Azure.Data.AppConfiguration;
using System.Collections.Generic;

namespace Microsoft.Extensions.Configuration.AzureAppConfiguration
Expand Down
7 changes: 5 additions & 2 deletions tests/Tests.AzureAppConfiguration/FeatureManagementTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,7 @@ public async Task WatchesFeatureFlags()
}

[Fact]
[Obsolete]
public async Task WatchesFeatureFlagsUsingCacheExpirationInterval()
{
var featureFlags = new List<ConfigurationSetting> { _kv };
Expand Down Expand Up @@ -874,6 +875,7 @@ public async Task SkipRefreshIfRefreshIntervalHasNotElapsed()
}

[Fact]
[Obsolete]
public async Task SkipRefreshIfCacheNotExpired()
{
var featureFlags = new List<ConfigurationSetting> { _kv };
Expand Down Expand Up @@ -1174,7 +1176,7 @@ MockAsyncPageable GetTestKeys(SettingSelector selector, CancellationToken ct)
if (newSetting != null)
copy.Add(TestHelpers.CloneSetting(newSetting));
return new MockAsyncPageable(copy);
};
}

var testClient = mockClient.Object;

Expand All @@ -1199,6 +1201,7 @@ MockAsyncPageable GetTestKeys(SettingSelector selector, CancellationToken ct)
}

[Fact]
[Obsolete]
public void AlternateValidFeatureFlagFormats()
{
var mockResponse = new Mock<Response>();
Expand All @@ -1215,7 +1218,7 @@ MockAsyncPageable GetTestKeys(SettingSelector selector, CancellationToken ct)
if (newSetting != null)
copy.Add(TestHelpers.CloneSetting(newSetting));
return new MockAsyncPageable(copy);
};
}

var testClient = mockClient.Object;

Expand Down
4 changes: 2 additions & 2 deletions tests/Tests.AzureAppConfiguration/KeyVaultReferenceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ MockAsyncPageable GetTestKeys(SettingSelector selector, CancellationToken ct)
if (newSetting != null)
copy.Add(TestHelpers.CloneSetting(newSetting));
return new MockAsyncPageable(copy);
};
}

var testClient = mockClient.Object;

Expand Down Expand Up @@ -1028,7 +1028,7 @@ MockAsyncPageable GetTestKeys(SettingSelector selector, CancellationToken ct)
if (newSetting != null)
copy.Add(TestHelpers.CloneSetting(newSetting));
return new MockAsyncPageable(copy);
};
}

var testClient = mockClient.Object;

Expand Down
6 changes: 3 additions & 3 deletions tests/Tests.AzureAppConfiguration/RefreshTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ Response<ConfigurationSetting> GetIfChanged(ConfigurationSetting setting, bool o
foreach (var setting in keyValueCollection)
{
copy.Add(TestHelpers.CloneSetting(setting));
};
}

return new MockAsyncPageable(copy);
});
Expand Down Expand Up @@ -392,7 +392,7 @@ Response<ConfigurationSetting> GetIfChanged(ConfigurationSetting setting, bool o
foreach (var setting in keyValueCollection)
{
copy.Add(TestHelpers.CloneSetting(setting));
};
}

return new MockAsyncPageable(copy);
});
Expand Down Expand Up @@ -461,7 +461,7 @@ public async Task RefreshTests_SingleServerCallOnSimultaneousMultipleRefresh()
foreach (var setting in keyValueCollection)
{
copy.Add(TestHelpers.CloneSetting(setting));
};
}

return new MockAsyncPageable(copy, operationDelay);
});
Expand Down