Skip to content

Commit

Permalink
test(storage): increase timeout for ACL test retry (#6618)
Browse files Browse the repository at this point in the history
Previously the docs said that these operations would take effect
within 10s, but I noticed that at some point this was loosened
up to "at least 30s" and "about a minute" depending on the
location. I think these tests will still usually run in a similar
amount of time, but hopefully extending this timeout will avoid
some flakes.

https://cloud.google.com/storage/docs/consistency#eventually_consistent_operations
https://cloud.google.com/storage/docs/access-control/lists#modification-rules
 (see note above)

Fixes #6579
  • Loading branch information
tritone committed Sep 7, 2022
1 parent 5733a42 commit c66c599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/integration_test.go
Expand Up @@ -4986,12 +4986,12 @@ func hasRule(acl []ACLRule, rule ACLRule) bool {
}

// retry retries a function call as well as an (optional) correctness check for up
// to 11 seconds. Both call and check must run without error in order to succeed.
// to 60 seconds. Both call and check must run without error in order to succeed.
// If the timeout is hit, the most recent error from call or check will be returned.
// This function should be used to wrap calls that might cause integration test
// flakes due to delays in propagation (for example, metadata updates).
func retry(ctx context.Context, call func() error, check func() error) error {
timeout := time.After(11 * time.Second)
timeout := time.After(60 * time.Second)
var err error
for {
select {
Expand Down

0 comments on commit c66c599

Please sign in to comment.