v0.34.0_2

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-17 23:37:43 +02:00
1 parent 0a8bc6f040
commit 434e789144
38 files changed
+899 -238

No files matched your search

+16
View File
@@ -96,5 +96,21 @@ mod tests {
}
assert_eq!(client.rotation_stats().rotations, 0);
}
#[test]
fn request_recycling_still_has_exact_threshold_after_clock_sampling() {
let backend = backend("requests-boundary", 18085);
let mut keepalive = crate::balance::Keepalive::default();
keepalive.pool_recycle_requests = 1_000;
keepalive.pool_recycle_seconds = 0;
let client = client_with_keepalive(
&backend, AddressPolicy::new(&backend).unwrap(), false, &keepalive,
).unwrap();
for _ in 0..1_000 { client.inner.client_for_request(); }
assert_eq!(client.rotation_stats().rotations, 0);
client.inner.client_for_request();
assert_eq!(client.rotation_stats().rotations, 1);
assert_eq!(client.rotation_stats().generation_requests, 1);
}
}