Skip to content

Commit

Permalink
Increase time limit to de-flake CI tests (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhump authored Jan 6, 2025
1 parent db9af00 commit c2931bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ func Example() {
log.Fatalf("failed to create schema watcher: %v", err)
return
}
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
// The BSR imposes a rate limit, so that multiple concurrent CI jobs can tickle it
// and then cause this next call to fail because all calls get rejected with a
// "resource exhausted" error. So that's why we have a large timeout of a whole
// minute: eventually, it will succeed, even if we get rate-limited due to other
// concurrent CI jobs hitting the same API with the same token.
ctx, cancel := context.WithTimeout(ctx, time.Minute)
defer cancel()
if err := schemaWatcher.AwaitReady(ctx); err != nil {
log.Fatalf("schema watcher never became ready: %v", err)
Expand Down

0 comments on commit c2931bb

Please sign in to comment.