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

HeapBasedRateTracker uses time provider to allow simluating of time in unit tests #3934

Merged

Conversation

peternied
Copy link
Member

Description

HeapBasedRateTracker uses time provider to allow simluating of time in unit tests

Issues Resolved

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (045d4ef) 65.16% compared to head (0b4294d) 65.29%.
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3934      +/-   ##
==========================================
+ Coverage   65.16%   65.29%   +0.12%     
==========================================
  Files         298      298              
  Lines       21218    21221       +3     
  Branches     3457     3457              
==========================================
+ Hits        13827    13856      +29     
+ Misses       5676     5649      -27     
- Partials     1715     1716       +1     
Files Coverage Δ
...curity/util/ratetracking/HeapBasedRateTracker.java 73.27% <100.00%> (+23.71%) ⬆️

@peternied peternied merged commit 37d3ca2 into opensearch-project:main Jan 11, 2024
82 checks passed
@peternied peternied deleted the heap-tracker-time-provider branch January 11, 2024 17:56
@peternied peternied added the backport 2.x backport to 2.x branch label Jan 11, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 11, 2024
…n unit tests (#3934)

Signed-off-by: Peter Nied <[email protected]>
(cherry picked from commit 37d3ca2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
willyborankin pushed a commit that referenced this pull request Jan 11, 2024
…ating of time in unit tests (#3941)

Backport 37d3ca2 from #3934.

Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dlin2028 pushed a commit to dlin2028/security that referenced this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] HeapBasedRateTrackerTest are unreliable
3 participants