in elasticsearch/src/http/transport.rs [1200:1219]
fn test_reseed() {
let connection_pool =
MultiNodeConnectionPool::round_robin(vec![], Some(Duration::from_secs(28800)));
let connections = expected_addresses()
.into_iter()
.map(Connection::new)
.collect();
connection_pool.reseed(connections);
for _ in 0..10 {
for expected in expected_addresses() {
let actual = connection_pool.next();
assert_eq!(expected.as_str(), actual.url.as_str());
}
}
// Check connection pool not reseedable after reseed
assert!(!connection_pool.reseedable());
assert!(!connection_pool.reseeding.load(Ordering::Relaxed));
}