patches flaky test_new_mark_creation_time (#17288)
This commit is contained in:
parent
2175fc0625
commit
f7b0184f81
|
@ -1048,22 +1048,28 @@ mod test {
|
||||||
let now = now + 1_000;
|
let now = now + 1_000;
|
||||||
let mut pings = Vec::new();
|
let mut pings = Vec::new();
|
||||||
let ping_cache = Mutex::new(ping_cache);
|
let ping_cache = Mutex::new(ping_cache);
|
||||||
for _ in 0..10 {
|
let old = old.contact_info().unwrap();
|
||||||
let req = node.new_pull_request(
|
let count = repeat_with(|| {
|
||||||
|
let (peer, _filters) = node
|
||||||
|
.new_pull_request(
|
||||||
&thread_pool,
|
&thread_pool,
|
||||||
&crds,
|
&crds,
|
||||||
&node_keypair,
|
&node_keypair,
|
||||||
0,
|
0, // self_shred_version
|
||||||
now,
|
now,
|
||||||
None,
|
None, // gossip_validators
|
||||||
&HashMap::new(),
|
&HashMap::new(), // stakes
|
||||||
PACKET_DATA_SIZE,
|
PACKET_DATA_SIZE, // bloom_size
|
||||||
&ping_cache,
|
&ping_cache,
|
||||||
&mut pings,
|
&mut pings,
|
||||||
);
|
)
|
||||||
let (peer, _) = req.unwrap();
|
.unwrap();
|
||||||
assert_eq!(peer, *old.contact_info().unwrap());
|
peer
|
||||||
}
|
})
|
||||||
|
.take(100)
|
||||||
|
.filter(|peer| peer != old)
|
||||||
|
.count();
|
||||||
|
assert!(count < 2, "count of peer != old: {}", count);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in New Issue