Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase time limit to de-flake CI tests #117

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading