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: flaky test #1169

Merged
merged 1 commit into from
Oct 18, 2024
Merged

chore: flaky test #1169

merged 1 commit into from
Oct 18, 2024

Conversation

toddbaert
Copy link
Member

@toddbaert toddbaert commented Oct 18, 2024

A test in this suite use the non-blocking provider set, which can result in flakiness in these cases since we aren't listening for a ready event.

@toddbaert toddbaert requested a review from a team as a code owner October 18, 2024 11:13
@toddbaert toddbaert requested a review from aepfli October 18, 2024 11:14
Copy link

sonarcloud bot commented Oct 18, 2024

@@ -42,7 +42,7 @@ void reset_logs() {
@DisplayName("should not throw exception if hook has different type argument than hookContext")
void shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext() {
OpenFeatureAPI api = OpenFeatureAPI.getInstance();
api.setProvider("shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext", new DoSomethingProvider());
api.setProviderAndWait("shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext", new DoSomethingProvider());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test isn't helped by using the non-blocking provider setter here. There are a few tests where we want to not block (to assert behaviors about the SDK before the provider is ready, for instance) but this is not one.

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.20%. Comparing base (51a3410) to head (fe0ad3b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1169      +/-   ##
============================================
+ Coverage     93.01%   93.20%   +0.19%     
- Complexity      436      437       +1     
============================================
  Files            40       40              
  Lines          1016     1016              
  Branches         84       84              
============================================
+ Hits            945      947       +2     
+ Misses           43       42       -1     
+ Partials         28       27       -1     
Flag Coverage Δ
unittests 93.20% <ø> (+0.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@toddbaert toddbaert changed the title chore: blocking set-provider in tests chore: flaky test Oct 18, 2024
@toddbaert toddbaert merged commit d6d284b into main Oct 18, 2024
12 checks passed
@toddbaert toddbaert deleted the chore/flaky-tests branch October 18, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants