fixes test_filter_current flakiness (#14749)
This commit is contained in:
parent
3c6dbd21d2
commit
e4da6761a7
|
@ -675,6 +675,8 @@ mod test {
|
|||
use super::*;
|
||||
use crate::contact_info::ContactInfo;
|
||||
use bincode::{deserialize, Options};
|
||||
use rand::SeedableRng;
|
||||
use rand_chacha::ChaChaRng;
|
||||
use solana_perf::test_tx::test_tx;
|
||||
use solana_sdk::signature::{Keypair, Signer};
|
||||
use solana_sdk::timing::timestamp;
|
||||
|
@ -843,7 +845,8 @@ mod test {
|
|||
|
||||
#[test]
|
||||
fn test_filter_current() {
|
||||
let mut rng = rand::thread_rng();
|
||||
let seed = [48u8; 32];
|
||||
let mut rng = ChaChaRng::from_seed(seed);
|
||||
let keys: Vec<_> = repeat_with(Keypair::new).take(16).collect();
|
||||
let values: Vec<_> = repeat_with(|| {
|
||||
let index = rng.gen_range(0, keys.len());
|
||||
|
|
Loading…
Reference in New Issue