patches flaky test_push_votes_with_tower (#26554)
cargo test --package solana-gossip --release test_push_votes_with_tower occasionally fails because with --release all votes are generated at the same wallclock (milliseconds resolution) and so the new ones will not necessarily override existing entries in the table. The commit ensures that the new vote is pushed with a wallclock later than existing entries.
This commit is contained in:
parent
ba785cf8ab
commit
128226c6cc
|
@ -3874,6 +3874,9 @@ RPC Enabled Nodes: 1"#;
|
|||
tower.push(slot);
|
||||
tower.remove(23);
|
||||
let vote = new_vote_transaction(&mut rng, vec![slot]);
|
||||
// New versioned-crds-value should have wallclock later than existing
|
||||
// entries, otherwise might not get inserted into the table.
|
||||
sleep(Duration::from_millis(5));
|
||||
cluster_info.push_vote(&tower, vote);
|
||||
let vote_slots = get_vote_slots(&cluster_info);
|
||||
assert_eq!(vote_slots.len(), MAX_LOCKOUT_HISTORY);
|
||||
|
|
Loading…
Reference in New Issue