From 81547dd19ee018180c34e1f87cd08f23f8f373ba Mon Sep 17 00:00:00 2001 From: Manu Gupta Date: Tue, 18 Dec 2018 03:52:57 -0800 Subject: [PATCH] reduce sleep time in e2e between http calls (#994) * reduce sleep time * Check for version faster * sleep to 1 sec to reduce hits * Update scripts --- scripts/ps/test_e2e.ps1 | 4 ++-- scripts/test_e2e.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ps/test_e2e.ps1 b/scripts/ps/test_e2e.ps1 index fb56668d..1e2ac23d 100755 --- a/scripts/ps/test_e2e.ps1 +++ b/scripts/ps/test_e2e.ps1 @@ -49,10 +49,10 @@ try { $proxyUp = $false do { try { - $proxyUp = (Invoke-WebRequest -Method GET -Uri http://localhost:3000/healthz).StatusCode -eq "200" + $proxyUp = (Invoke-WebRequest -Method GET -Uri http://localhost:3000/readyz).StatusCode -eq "200" } catch { - Start-Sleep -Seconds 5 + Start-Sleep -Seconds 1 } } while(-not $proxyUp) diff --git a/scripts/test_e2e.sh b/scripts/test_e2e.sh index 538b446c..410bd292 100755 --- a/scripts/test_e2e.sh +++ b/scripts/test_e2e.sh @@ -41,7 +41,7 @@ export GO111MODULE=on cd $REPO_DIR/cmd/proxy pkill athens-proxy || true # cleanup proxy if it is running go build -mod=vendor -o athens-proxy && ./athens-proxy & -while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:3000)" != "200" ]]; do sleep 5; done +while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:3000/readyz)" != "200" ]]; do sleep 1; done # Clone our test repo TEST_SOURCE=${TMPDIR}/happy-path