Quinn test failure regression from fastbloom 0.15
```
---- bloom_token_log::test::k_num_zero stdout ----
thread 'bloom_token_log::test::k_num_zero' (5526) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/fastbloom-0.16.0/src/builder.rs:129:1:
attempt to subtract with overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
This test fails in a way that seems to be caused by upgrading fastbloom from 0.14 to 0.15 (or 0.16). Is this intentional?
```rust
fn test_doesnt_panic(log: BloomTokenLog) {
let mut rng = new_rng();
let issued = SystemTime::now();
let lifetime = Duration::from_secs(1_000_000);
for _ in 0..200 {
let _ = log.check_and_insert(rng.random::<u128>(), issued, lifetime);
}
}
#[test]
fn k_num_zero() {
test_doesnt_panic(BloomTokenLog::new(100, 0));
}
```
See:
- https://github.com/quinn-rs/quinn/pull/2540
关闭于 2026-03-01 9 条评论