Skip to content

Commit

Permalink
Fix grep causing failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
bnapolitan committed Jun 14, 2020
1 parent 4fbce7e commit ef6841e
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions scripts/lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,21 @@ function run_scale_test_130_pods() {
ITERATION_START=$SECONDS
$KUBECTL_PATH scale -f deploy-130-pods.yaml --replicas=130
sleep 20
GET_DEPLOY_OUTPUT=""
while [[ ${#GET_DEPLOY_OUTPUT} -lt 1 && $((SECONDS - ITERATION_START)) -lt 200 ]]
while [[ ! $($KUBECTL_PATH get deploy | grep 130/130) && $((SECONDS - ITERATION_START)) -lt 200 ]]
do
sleep 1
echo "Scaling UP"
echo $($KUBECTL_PATH get deploy)
GET_DEPLOY_OUTPUT=$($KUBECTL_PATH get deploy | grep 130/130)
echo "Made it past grep get deploy. Printing grep length and seconds taken"
echo ${#GET_DEPLOY_OUTPUT}
echo $((SECONDS - ITERATION_START))
done

SCALE_UP_DURATION_ARRAY+=( $((SECONDS - ITERATION_START)) )
MIDPOINT_START=$SECONDS
$KUBECTL_PATH scale -f deploy-130-pods.yaml --replicas=0
GET_DELETE_OUTPUT="TEMPSTRING"
while [[ ${#GET_DELETE_OUTPUT} -gt 1 && $((SECONDS - MIDPOINT_START)) -lt 200 ]]
while [[ $($KUBECTL_PATH get pods) && $((SECONDS - MIDPOINT_START)) -lt 200 ]]
do
sleep 1
echo "Scaling DOWN"
echo $($KUBECTL_PATH get deploy)
GET_DELETE_OUTPUT=$($KUBECTL_PATH get pods)
done
SCALE_DOWN_DURATION_ARRAY+=($((SECONDS - MIDPOINT_START)))
done
Expand Down

0 comments on commit ef6841e

Please sign in to comment.