Adds health check setting to pool and avoids get_config in hotpath (#235)

* Adds healthcheck settings to pool

* fmt

* Fix test
This commit is contained in:
zainkabani
2022-11-16 18:51:15 -08:00
committed by GitHub
parent b7e70b885c
commit 0c96156dae
2 changed files with 16 additions and 7 deletions

View File

@@ -775,6 +775,8 @@ mod test {
primary_reads_enabled: false,
sharding_function: ShardingFunction::PgBigintHash,
automatic_sharding_key: Some(String::from("id")),
healthcheck_delay: PoolSettings::default().healthcheck_delay,
healthcheck_timeout: PoolSettings::default().healthcheck_timeout,
};
let mut qr = QueryRouter::new();
assert_eq!(qr.active_role, None);