boinkor-net / governor

A rate-limiting library for Rust (f.k.a. ratelimit_meter)
https://github.com/boinkor-net/governor
MIT License
579 stars 45 forks source link

Add tests that work out shrink_to_fit and check_n_keys #113

Closed antifuchs closed 2 years ago

antifuchs commented 2 years ago

This does get a few tasty percent of coverage back, but more so, also adds some useful behavioral checks.

Fixes #112

codecov[bot] commented 2 years ago

Codecov Report

Merging #113 (5c7d5c6) into master (3ba020f) will increase coverage by 1.25%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
+ Coverage   96.24%   97.49%   +1.25%     
==========================================
  Files          30       30              
  Lines        2075     2156      +81     
==========================================
+ Hits         1997     2102     +105     
+ Misses         78       54      -24     
Impacted Files Coverage Δ
governor/src/state/keyed.rs 100.00% <100.00%> (+30.90%) :arrow_up:
governor/tests/keyed_dashmap.rs 100.00% <100.00%> (ø)
governor/tests/keyed_hashmap.rs 100.00% <100.00%> (ø)
governor/src/state/keyed/hashmap.rs 100.00% <0.00%> (+11.76%) :arrow_up:
governor/src/state/keyed/dashmap.rs 100.00% <0.00%> (+13.04%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3ba020f...5c7d5c6. Read the comment docs.

antifuchs commented 2 years ago

bors merge

bors[bot] commented 2 years ago

Build succeeded: