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: fix race with events tests #545

Merged
merged 1 commit into from
Aug 4, 2023
Merged

chore: fix race with events tests #545

merged 1 commit into from
Aug 4, 2023

Conversation

toddbaert
Copy link
Member

@toddbaert toddbaert commented Aug 4, 2023

I believe this was causing intermittent failures with tests. This static field on a package private member meant that the instance we created for testing (which we shutdown) was shared with the "real" API instance (see here for an example failure).

I don't think this constitutes a production bug, but it should make our tests more reliable.

Edit: I ran this suite locally 10+ times and in GH 5 times and it seems to run reliably now.

@toddbaert toddbaert requested a review from a team as a code owner August 4, 2023 19:08
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #545 (9d22159) into main (c545ed5) will increase coverage by 0.13%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main     #545      +/-   ##
============================================
+ Coverage     95.23%   95.36%   +0.13%     
- Complexity      329      330       +1     
============================================
  Files            31       31              
  Lines           755      755              
  Branches         37       37              
============================================
+ Hits            719      720       +1     
+ Misses           19       18       -1     
  Partials         17       17              
Flag Coverage Δ
unittests 95.36% <100.00%> (+0.13%) ⬆️

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

Files Changed Coverage Δ
...rc/main/java/dev/openfeature/sdk/EventSupport.java 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@Kavindu-Dodan Kavindu-Dodan left a comment

Choose a reason for hiding this comment

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

casued by the test ShutdownBehaviorSpecTest where we call executor shutdown

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