Skip to content

chore: fix race with events tests - #545

Merged
toddbaert merged 1 commit into
mainfrom
chore/fix-events-race
Aug 4, 2023
Merged

toddbaert merged 1 commit into
mainfrom
chore/fix-events-race

Conversation

@toddbaert

@toddbaert toddbaert commented Aug 4, 2023 •

Copy link
Copy Markdown
Member

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.

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert
toddbaert requested a review from a team as a code owner August 4, 2023 19:08
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2023

Copy link
Copy Markdown

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

codecov Bot commented Aug 4, 2023 •

Copy link
Copy Markdown

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

@Kavindu-Dodan Kavindu-Dodan left a comment

Copy link
Copy Markdown
Contributor

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