v0.35.0
This commit is contained in:
1 parent
2c03fcf248
commit
d3b492874b
95 files changed
+1628
-743
No files matched your search
@@ -29,9 +29,11 @@ mod tests {
|
||||
#[test]
|
||||
fn generation_recycles_after_request_budget() {
|
||||
let backend = backend("rotation-test", 18081);
|
||||
let mut keepalive = crate::balance::Keepalive::default();
|
||||
keepalive.pool_recycle_requests = 2;
|
||||
keepalive.pool_recycle_seconds = 0;
|
||||
let keepalive = crate::balance::Keepalive {
|
||||
pool_recycle_requests: 2,
|
||||
pool_recycle_seconds: 0,
|
||||
..Default::default()
|
||||
};
|
||||
let client = client_with_keepalive(
|
||||
&backend,
|
||||
AddressPolicy::new(&backend).unwrap(),
|
||||
@@ -52,9 +54,11 @@ mod tests {
|
||||
#[test]
|
||||
fn generation_recycles_after_age_without_request() {
|
||||
let backend = backend("rotation-age-test", 18083);
|
||||
let mut keepalive = crate::balance::Keepalive::default();
|
||||
keepalive.pool_recycle_requests = 0;
|
||||
keepalive.pool_recycle_seconds = 1;
|
||||
let keepalive = crate::balance::Keepalive {
|
||||
pool_recycle_requests: 0,
|
||||
pool_recycle_seconds: 1,
|
||||
..Default::default()
|
||||
};
|
||||
let client = client_with_keepalive(
|
||||
&backend,
|
||||
AddressPolicy::new(&backend).unwrap(),
|
||||
@@ -78,9 +82,11 @@ mod tests {
|
||||
#[test]
|
||||
fn generation_recycling_can_be_disabled() {
|
||||
let backend = backend("rotation-off", 18082);
|
||||
let mut keepalive = crate::balance::Keepalive::default();
|
||||
keepalive.pool_recycle_requests = 0;
|
||||
keepalive.pool_recycle_seconds = 0;
|
||||
let keepalive = crate::balance::Keepalive {
|
||||
pool_recycle_requests: 0,
|
||||
pool_recycle_seconds: 0,
|
||||
..Default::default()
|
||||
};
|
||||
let client = client_with_keepalive(
|
||||
&backend,
|
||||
AddressPolicy::new(&backend).unwrap(),
|
||||
@@ -96,9 +102,11 @@ mod tests {
|
||||
#[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 keepalive = crate::balance::Keepalive {
|
||||
pool_recycle_requests: 1_000,
|
||||
pool_recycle_seconds: 0,
|
||||
..Default::default()
|
||||
};
|
||||
let client = client_with_keepalive(
|
||||
&backend,
|
||||
AddressPolicy::new(&backend).unwrap(),
|
||||
|
||||
Reference in new issue
Block a user