Skip to content
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

chore: revert breaking setProvider #190

Merged
merged 22 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
38a8bd4
chore: revert breaking setProvider
toddbaert Jan 17, 2024
d663052
fixup: disable warning
toddbaert Jan 17, 2024
a4d9e6b
fixup: formatting
toddbaert Jan 17, 2024
e9bece4
fixup: review
toddbaert Jan 18, 2024
d34331a
fixup: more awaits in tests
toddbaert Jan 18, 2024
9837d32
Merge branch 'main' into chore/revert-breaking-setProvider-change
askpt Jan 22, 2024
5dddf65
fixup: merge conflicts
toddbaert Jan 22, 2024
952b002
fixup: use new util
toddbaert Jan 22, 2024
4343571
Update test/OpenFeature.Tests/ProviderRepositoryTests.cs
toddbaert Jan 22, 2024
b96117e
Update test/OpenFeature.Tests/ProviderRepositoryTests.cs
toddbaert Jan 22, 2024
de971f7
Update test/OpenFeature.Tests/ProviderRepositoryTests.cs
toddbaert Jan 22, 2024
08b4f48
Update test/OpenFeature.Tests/OpenFeatureTests.cs
toddbaert Jan 22, 2024
aa98784
Update test/OpenFeature.Tests/OpenFeatureTests.cs
toddbaert Jan 22, 2024
ca9c815
Update test/OpenFeature.Tests/OpenFeatureTests.cs
toddbaert Jan 22, 2024
5df17d8
Update test/OpenFeature.Tests/OpenFeatureTests.cs
toddbaert Jan 22, 2024
4d815ef
Update test/OpenFeature.Tests/OpenFeatureTests.cs
toddbaert Jan 22, 2024
36c0089
Update test/OpenFeature.Tests/OpenFeatureEventTests.cs
toddbaert Jan 22, 2024
8d227c6
Update test/OpenFeature.Tests/OpenFeatureTests.cs
toddbaert Jan 22, 2024
5e008dd
Update test/OpenFeature.Tests/OpenFeatureTests.cs
toddbaert Jan 22, 2024
ea26bc4
Update test/OpenFeature.Tests/OpenFeatureTests.cs
toddbaert Jan 22, 2024
528b723
Update test/OpenFeature.Tests/OpenFeatureTests.cs
toddbaert Jan 22, 2024
a9d9fbc
Update test/OpenFeature.Tests/OpenFeatureTests.cs
toddbaert Jan 22, 2024
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
4 changes: 2 additions & 2 deletions src/OpenFeature/Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private Api() { }
[Obsolete("Will be removed in later versions; use SetProviderAsync, which can be awaited")]
public void SetProvider(FeatureProvider featureProvider)
{
this.EventExecutor.RegisterDefaultFeatureProvider(featureProvider);
this._eventExecutor.RegisterDefaultFeatureProvider(featureProvider);
_ = this._repository.SetProvider(featureProvider, this.GetContext());
}

Expand All @@ -68,7 +68,7 @@ public async Task SetProviderAsync(FeatureProvider featureProvider)
[Obsolete("Will be removed in later versions; use SetProviderAsync, which can be awaited")]
public void SetProvider(string clientName, FeatureProvider featureProvider)
{
this.EventExecutor.RegisterClientFeatureProvider(clientName, featureProvider);
this._eventExecutor.RegisterClientFeatureProvider(clientName, featureProvider);
_ = this._repository.SetProvider(clientName, featureProvider, this.GetContext());
}

Expand Down
2 changes: 1 addition & 1 deletion test/OpenFeature.Tests/OpenFeatureEventTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public async Task API_Level_Event_Handlers_Should_Be_Informed_About_Ready_State_
[Specification("5.2.4", "The `handler function` MUST accept a `event details` parameter.")]
[Specification("5.3.1", "If the provider's `initialize` function terminates normally, `PROVIDER_READY` handlers MUST run.")]
[Specification("5.3.3", "Handlers attached after the provider is already in the associated state, MUST run immediately.")]
public void API_Level_Event_Handlers_Should_Be_Informed_About_Ready_State_After_Registering_Provider_Ready_Sync()
public async void API_Level_Event_Handlers_Should_Be_Informed_About_Ready_State_After_Registering_Provider_Ready_Sync()
toddbaert marked this conversation as resolved.
Show resolved Hide resolved
{
var eventHandler = Substitute.For<EventHandlerDelegate>();

Expand Down
Loading