From 574ac64918243afbe57b699b18f2567166379cde Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Mon, 6 Jan 2025 13:11:07 -0500 Subject: [PATCH] increase time limit to de-flake CI tests --- example_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/example_test.go b/example_test.go index 5fe7a9c..a3b4a07 100644 --- a/example_test.go +++ b/example_test.go @@ -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)