-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: add method to set provider and block during init #563
Conversation
The API SHOULD provide functions to set a provider and wait for the initialize function to return or throw Signed-off-by: liran2000 <liran2000@gmail.com>
hi @toddbaert, on the approach to implement it, I thought it can be good in this case to call initialize on the same caller thread as it needs to wait. @thomaspoignant for your recent spec addition. |
Codecov Report
@@ Coverage Diff @@
## main #563 +/- ##
============================================
+ Coverage 94.25% 94.76% +0.51%
- Complexity 356 358 +2
============================================
Files 32 32
Lines 835 841 +6
Branches 50 51 +1
============================================
+ Hits 787 797 +10
+ Misses 27 24 -3
+ Partials 21 20 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks! Interested in @thomaspoignant 's opinion.
My only requested change is this, which is a naming issue mostly (let me know if you disagree). Otherwise just optional suggestions.
I'm fine with this approach. |
@liran2000 I've updated the PR title to be more "friendly" since it goes into our release notes. |
Signed-off-by: liran2000 <liran2000@gmail.com>
Signed-off-by: liran2000 <liran2000@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left 2 more small nits!
Signed-off-by: liran2000 <liran2000@gmail.com>
@thomaspoignant since you came up with this spec proposal, I'm interested in your opinion of this implementation. |
I'm going to merge this EOD unless I hear objections. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
The API SHOULD provide functions to set a provider and wait for the initialize function to return or throw
This PR
implements spec Requirement 1.1.8.
following blocking setProvider PR.