mirror of
https://github.com/cloudflare/pingora.git
synced 2024-09-20 02:31:35 +02:00
38a9d556b5
I started fidgeting with another one of the tests breaking because of the estimator not being deterministic, and then decided to do this another way. This adds `seeded` and `seeded_compact` constructors to the estimator which are used in tests to override the LFU. These are hidden behind `cfg(test)`. The `random_status` field of the UFO object is also overridden with the same seeds as used for the seeded LFU. These make the tests pass consistently without requiring further monkeying. |
||
---|---|---|
.. | ||
buckets.rs | ||
estimation.rs | ||
lib.rs |