Skip to content

Commit 36d6ca2

Browse files
authored
test: reduce integration test flakiness (#807)
1 parent ea74c30 commit 36d6ca2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

handwritten/cloud-profiler/system-test/integration_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// +build integration,go1.7
15+
//go:build integration && go1.7
1616

1717
package e2e
1818

@@ -96,7 +96,7 @@ git reset --hard {{.Commit}}
9696
9797
retry npm_install --nodedir="$NODEDIR"
9898
99-
npm run compile
99+
npm run compile
100100
npm pack --nodedir="$NODEDIR" >/dev/null
101101
VERSION=$(node -e "console.log(require('./package.json').version);")
102102
PROFILER="$HOME/cloud-profiler-nodejs/google-cloud-profiler-$VERSION.tgz"
@@ -110,6 +110,9 @@ retry npm_install node-pre-gyp
110110
retry npm_install --nodedir="$NODEDIR" "$PROFILER" typescript gts
111111
112112
npm run compile
113+
114+
# Workaround to reduce flakiness connecting to the metadata server.
115+
export DETECT_GCP_RETRIES=5
113116
{{- end }}
114117
115118
{{ define "integration" -}}

0 commit comments

Comments
 (0)