From 7477a3890639eb55237d672207754f01cd894723 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Tue, 17 Nov 2015 23:53:39 -0800 Subject: [PATCH] try harder to timeout hung curls in examples test --- k8petstore/k8petstore-loadbalancer.sh | 4 ++-- k8petstore/k8petstore-nodeport.sh | 4 ++-- k8petstore/k8petstore.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/k8petstore/k8petstore-loadbalancer.sh b/k8petstore/k8petstore-loadbalancer.sh index cfb05805..62b2b607 100755 --- a/k8petstore/k8petstore-loadbalancer.sh +++ b/k8petstore/k8petstore-loadbalancer.sh @@ -253,7 +253,7 @@ function pollfor { do ### Just testing that the front end comes up. Not sure how to test total entries etc... (yet) echo "Trying curl ... $PUBLIC_IP:3000 , attempt $i . expect a few failures while pulling images... " - curl --connect-timeout 1 "$PUBLIC_IP:3000" > result + curl --max-time 1 "$PUBLIC_IP:3000" > result cat result cat result | grep -q "k8-bps" if [ $? -eq 0 ]; then @@ -279,7 +279,7 @@ function tests { for i in `seq 1 $_SECONDS`; do echo "curl : $PUBLIC_IP:3000 , $i of $_SECONDS" - curr_cnt="`curl --connect-timeout 1 "$PUBLIC_IP:3000/llen"`" + curr_cnt="`curl --max-time 1 "$PUBLIC_IP:3000/llen"`" ### Write CSV File of # of trials / total transcations. echo "$i $curr_cnt" >> result echo "total transactions so far : $curr_cnt" diff --git a/k8petstore/k8petstore-nodeport.sh b/k8petstore/k8petstore-nodeport.sh index 42e05c1f..49360409 100755 --- a/k8petstore/k8petstore-nodeport.sh +++ b/k8petstore/k8petstore-nodeport.sh @@ -271,7 +271,7 @@ function pollfor { do ### Just testing that the front end comes up. Not sure how to test total entries etc... (yet) echo "Trying curl frontend:3000 via $TEST_IP:$NODE_PORT, attempt ${i}. Expect a few failures while pulling images... " - curl --connect-timeout 1 "$TEST_IP:$NODE_PORT" > result + curl --max-time 1 "$TEST_IP:$NODE_PORT" > result cat result cat result | grep -q "k8-bps" if [ $? -eq 0 ]; then @@ -296,7 +296,7 @@ function tests { for i in `seq 1 $_SECONDS`; do echo "curl : $TEST_IP:$NODE_PORT , $i of $_SECONDS" - curr_cnt="`curl --connect-timeout 1 "$TEST_IP:$NODE_PORT/llen"`" + curr_cnt="`curl --max-time 1 "$TEST_IP:$NODE_PORT/llen"`" ### Write CSV File of # of trials / total transcations. echo "$i $curr_cnt" >> result echo "total transactions so far : $curr_cnt" diff --git a/k8petstore/k8petstore.sh b/k8petstore/k8petstore.sh index 3fdc134a..285c2ddc 100755 --- a/k8petstore/k8petstore.sh +++ b/k8petstore/k8petstore.sh @@ -237,7 +237,7 @@ function pollfor { do ### Just testing that the front end comes up. Not sure how to test total entries etc... (yet) echo "Trying curl ... $PUBLIC_IP:3000 , attempt $i . expect a few failures while pulling images... " - curl --connect-timeout 1 "$PUBLIC_IP:3000" > result + curl --max-time 1 "$PUBLIC_IP:3000" > result cat result cat result | grep -q "k8-bps" if [ $? -eq 0 ]; then @@ -263,7 +263,7 @@ function tests { for i in `seq 1 $_SECONDS`; do echo "curl : $PUBLIC_IP:3000 , $i of $_SECONDS" - curr_cnt="`curl --connect-timeout 1 "$PUBLIC_IP:3000/llen"`" + curr_cnt="`curl --max-time 1 "$PUBLIC_IP:3000/llen"`" ### Write CSV File of # of trials / total transcations. echo "$i $curr_cnt" >> result echo "total transactions so far : $curr_cnt"