Skip to content

Commit

Permalink
chore: add retries to e2e test (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanmar511 authored and aalexand committed Jun 11, 2018
1 parent 2c9fd12 commit 4212aed
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion testing/integration_test.sh
@@ -1,5 +1,12 @@
#!/bin/bash

retry() {
for i in {1..3}; do
"${@}" && return 0
done
return 1
}

# Fail on any error.
set -eo pipefail

Expand All @@ -24,7 +31,7 @@ cp -R "testing" "$GOPATH/src/proftest"

# Run test.
cd "$GOPATH/src/proftest"
go get -t -tags=integration .
retry go get -t -tags=integration .
if [ "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" == "" ]; then
go test -timeout=30m -tags=integration -run TestAgentIntegration -commit="$COMMIT" -branch="$BRANCH" -repo="$REPO"
else
Expand Down

0 comments on commit 4212aed

Please sign in to comment.