Add partial network outage before test functionality (#17291)
* Add partial network outage before testing functionality Allow a percentage of the stake to go offline before an automation test starts * code review fixes
This commit is contained in:
@ -60,7 +60,7 @@ function analyze_packet_loss {
|
||||
)
|
||||
}
|
||||
|
||||
function wait_for_bootstrap_validator_stake_drop {
|
||||
function wait_for_max_stake {
|
||||
max_stake="$1"
|
||||
if [[ $max_stake -eq 100 ]]; then
|
||||
return
|
||||
@ -74,6 +74,16 @@ function wait_for_bootstrap_validator_stake_drop {
|
||||
ssh "${sshOptions[@]}" "${validatorIpList[0]}" "RUST_LOG=info \$HOME/.cargo/bin/solana wait-for-max-stake $max_stake --url http://127.0.0.1:8899"
|
||||
}
|
||||
|
||||
function wait_for_equal_stake {
|
||||
source "${REPO_ROOT}"/net/common.sh
|
||||
loadConfigFile
|
||||
|
||||
max_stake=$((100 / ${#validatorIpList[@]} + 1))
|
||||
execution_step "Waiting for max stake to fall below ${max_stake}%"
|
||||
|
||||
wait_for_max_stake $max_stake
|
||||
}
|
||||
|
||||
function get_slot {
|
||||
source "${REPO_ROOT}"/net/common.sh
|
||||
loadConfigFile
|
||||
|
Reference in New Issue
Block a user