Skip to content

Commit

Permalink
limit validator exit run to its own serial run subset
Browse files Browse the repository at this point in the history
add 10ms delay in the validator exit tests
  • Loading branch information
HaoranYi committed Mar 11, 2022
1 parent 080e50c commit 67ed13d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1766,11 +1766,11 @@ mod tests {
serial_test::serial,
solana_ledger::{create_new_tmp_ledger, genesis_utils::create_genesis_config_with_leader},
solana_sdk::{genesis_config::create_genesis_config, poh_config::PohConfig},
std::fs::remove_dir_all,
std::{fs::remove_dir_all, thread, time},
};

#[test]
#[serial]
#[serial(serial_run_validator_exit)]
fn validator_exit() {
solana_logger::setup();
let leader_keypair = Keypair::new();
Expand Down Expand Up @@ -1807,6 +1807,8 @@ mod tests {
);
validator.close();
remove_dir_all(validator_ledger_path).unwrap();

thread::sleep(time::Duration::from_millis(10));
}

#[test]
Expand Down Expand Up @@ -1851,7 +1853,7 @@ mod tests {
}

#[test]
#[serial]
#[serial(serial_run_validator_exit)]
fn validator_parallel_exit() {
let leader_keypair = Keypair::new();
let leader_node = Node::new_localhost_with_pubkey(&leader_keypair.pubkey());
Expand Down Expand Up @@ -1897,6 +1899,8 @@ mod tests {
for path in ledger_paths {
remove_dir_all(path).unwrap();
}

thread::sleep(time::Duration::from_millis(10));
}

#[test]
Expand Down

0 comments on commit 67ed13d

Please sign in to comment.