Skip to content

bugfix: fix flakey test, avoid early finalization#13095

Merged
Jackie-Jiang merged 1 commit intoapache:masterfrom
itschrispeck:finalizer_fix
May 10, 2024
Merged

bugfix: fix flakey test, avoid early finalization#13095
Jackie-Jiang merged 1 commit intoapache:masterfrom
itschrispeck:finalizer_fix

Conversation

@itschrispeck
Copy link
Contributor

@itschrispeck itschrispeck commented May 7, 2024

Addresses a flakey test issue noticed by @Jackie-Jiang here. Also addresses other tests that could be flakey for the same reason.

For background, see: https://julien.ponge.org/blog/not-all-java-single-threaded-executors-are-created-equal-a-java-finalizer-horror-story/ and https://bugs.openjdk.org/browse/JDK-8145304. Executors.newSingleThreadExecutor can only be used in this manner safely in Java 21+.

Also verified that non-test code using Executors.newSingleThreadExecutor looks safe.

tags: bugfix

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.21%. Comparing base (59551e4) to head (3726469).
⚠️ Report is 2778 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13095      +/-   ##
============================================
+ Coverage     61.75%   62.21%   +0.46%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2507      +71     
  Lines        133233   137785    +4552     
  Branches      20636    21328     +692     
============================================
+ Hits          82274    85720    +3446     
- Misses        44911    45671     +760     
- Partials       6048     6394     +346     
Flag Coverage Δ
custom-integration1 <0.01% <ø> (-0.01%) ⬇️
integration <0.01% <ø> (-0.01%) ⬇️
integration1 <0.01% <ø> (-0.01%) ⬇️
integration2 0.00% <ø> (ø)
java-11 62.16% <ø> (+0.45%) ⬆️
java-21 62.06% <ø> (+0.43%) ⬆️
skip-bytebuffers-false 62.17% <ø> (+0.43%) ⬆️
skip-bytebuffers-true 62.03% <ø> (+34.30%) ⬆️
temurin 62.21% <ø> (+0.46%) ⬆️
unittests 62.20% <ø> (+0.46%) ⬆️
unittests1 46.85% <ø> (-0.04%) ⬇️
unittests2 27.78% <ø> (+0.05%) ⬆️

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.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@yashmayya yashmayya left a comment

Choose a reason for hiding this comment

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

Nice find!

@Jackie-Jiang Jackie-Jiang merged commit c77a65d into apache:master May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants