Skip to content

Commit

Permalink
test(storage): add 5m timeout per integration test (googleapis#10227)
Browse files Browse the repository at this point in the history
This allows easier debugging when integration test runs get
stalled as in googleapis#10178
  • Loading branch information
tritone committed May 18, 2024
1 parent 67d42ba commit e2cf46b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions storage/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ func multiTransportTest(ctx context.Context, t *testing.T,
prefix = grpcTestPrefix
}

// Don't let any individual test run more than 5 minutes. This eases debugging if
// test runs get stalled out.
ctx, cancel := context.WithTimeout(ctx, 5*time.Minute)
defer cancel()

test(t, ctx, bucket, prefix, client)
})
}
Expand Down Expand Up @@ -314,12 +319,6 @@ var readCases = []readCase{
func TestIntegration_BucketCreateDelete(t *testing.T) {
ctx := skipJSONReads(context.Background(), "no reads in test")
multiTransportTest(ctx, t, func(t *testing.T, ctx context.Context, _ string, prefix string, client *Client) {

// This timeout is added for debugging #10178
// TODO: remove when issue is resolved.
ctx, cancel := context.WithTimeout(ctx, 5*time.Minute)
defer cancel()

projectID := testutil.ProjID()

labels := map[string]string{
Expand Down

0 comments on commit e2cf46b

Please sign in to comment.