Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
adjust parameters and output
Browse files Browse the repository at this point in the history
  • Loading branch information
AshwinSekar committed Oct 27, 2021
1 parent b8777e4 commit 00b23d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion system-test/partition-testcases/gce-partition-recovery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ steps:
TEST_TYPE: "script"
WARMUP_SLOTS_BEFORE_TEST: 400
PRE_PARTITION_DURATION: 120
PARTITION_DURATION: 120
PARTITION_DURATION: 600
PARTITION_INCREMENT: 120
NETEM_CONFIG_FILE: "system-test/netem-configs/complete-loss-two-partitions"
CUSTOM_SCRIPT: "system-test/partition-testcases/measure-partition-recovery.sh"
agents:
Expand Down
13 changes: 8 additions & 5 deletions system-test/partition-testcases/measure-partition-recovery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ if [[ -z $PARTITION_DURATION ]]; then
PARTITION_DURATION=300
fi

if [[ -z $PARTITION_INCREMENT ]]; then
PARTITION_INCREMENT=60
fi

num_online_nodes=$(( NUMBER_OF_VALIDATOR_NODES + 1 ))
if [[ -n "$NUMBER_OF_OFFLINE_NODES" ]]; then
num_online_nodes=$(( num_online_nodes - NUMBER_OF_OFFLINE_NODES ))
Expand All @@ -46,21 +50,20 @@ while true; do

get_validator_confirmation_time 10
time=0
echo "Validator confirmation is $mean_confirmation_ms ms immediately after resolving the partition" >> "$RESULT_FILE"
echo "Validator confirmation is $mean_confirmation_ms ms immediately after resolving the partition"

while [[ $mean_confirmation_ms == "expected" || $mean_confirmation_ms -gt $target ]]; do
sleep 1
time=$(( time + 1 ))

if [[ $time -gt $PARTITION_DURATION ]]; then
echo "Unable to make progress after $time seconds. confirmation time is still $mean_confirmation_ms ms" >> "$RESULT_FILE"
echo "Partition Duration: $PARTITION_DURATION: Unable to make progress after $time seconds. Confirmation time did not fall below pre partition confirmation time" >> "$RESULT_FILE"
exit 0
fi
get_validator_confirmation_time 10
done

echo "$time seconds after resolving the partition, validator confirmation time fell to $mean_confirmation_ms ms" >> "$RESULT_FILE"
printf "\n" >> "$RESULT_FILE"
echo "Partition Duration: $PARTITION: $time seconds for validator confirmation to fall to $mean_confirmation_ms ms" >> "$RESULT_FILE"

PARTITION_DURATION=$(( PARTITION_DURATION + 60 ))
PARTITION_DURATION=$(( PARTITION_DURATION + PARTITION_INCREMENT ))
done

0 comments on commit 00b23d2

Please sign in to comment.