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

Ignore code coverage for method executed non-deterministically in tests #838

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

msridhar
Copy link
Collaborator

@msridhar msridhar commented Sep 29, 2023

Fixes #828 (hopefully)

There is some non-determinism in whether com.uber.nullaway.dataflow.AccessPath.IteratorContentsKey#equals runs or not during tests (see the code comment). The non-determinism will be hard for us to fix, so instead, add an annotation that tells JaCoCo to ignore coverage of this method (which is low risk as it's an equals() method that I don't expect will change).

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (b64d1c1) 86.76% compared to head (a89927d) 86.78%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #838      +/-   ##
============================================
+ Coverage     86.76%   86.78%   +0.01%     
  Complexity     1877     1877              
============================================
  Files            74       74              
  Lines          6197     6191       -6     
  Branches       1206     1204       -2     
============================================
- Hits           5377     5373       -4     
+ Misses          408      407       -1     
+ Partials        412      411       -1     
Files Coverage Δ
...in/java/com/uber/nullaway/dataflow/AccessPath.java 90.76% <ø> (+0.76%) ⬆️

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

@msridhar msridhar marked this pull request as ready for review September 29, 2023 19:17
@msridhar msridhar changed the title [WIP] Ignore code coverage for method executed non-deterministically in tests Ignore code coverage for method executed non-deterministically in tests Sep 29, 2023
Copy link
Collaborator

@lazaroclapp lazaroclapp left a comment

Choose a reason for hiding this comment

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

👍

@msridhar msridhar merged commit 91374c3 into uber:master Sep 29, 2023
9 checks passed
@msridhar msridhar deleted the access-path-test-coverage branch September 29, 2023 19:42
msridhar added a commit that referenced this pull request Oct 8, 2023
Another fix related to #828 (see also #838)
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.

Fix non-determinism in test coverage of AccessPath
2 participants