From 93ccb57ed2c8c56b23b85390bf79a7f0953153bf Mon Sep 17 00:00:00 2001 From: Alex Hong <9397363+hongalex@users.noreply.github.com> Date: Fri, 4 Feb 2022 10:13:53 -0800 Subject: [PATCH] test(pubsub): increase TestIntegration_All timeout for Pull flakiness (#5450) --- pubsub/integration_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pubsub/integration_test.go b/pubsub/integration_test.go index 27518b0ba285..73375286b5cf 100644 --- a/pubsub/integration_test.go +++ b/pubsub/integration_test.go @@ -310,14 +310,15 @@ func testPublishAndReceive(t *testing.T, client *Client, maxMsgs int, synchronou // Use a timeout to ensure that Pull does not block indefinitely if there are // unexpectedly few messages available. now := time.Now() - timeoutCtx, cancel := context.WithTimeout(ctx, time.Minute) + timeout := 3 * time.Minute + timeoutCtx, cancel := context.WithTimeout(ctx, timeout) defer cancel() gotMsgs, err := pullN(timeoutCtx, sub, len(want), func(ctx context.Context, m *Message) { m.Ack() }) if err != nil { if c := status.Convert(err); c.Code() == codes.Canceled { - if time.Since(now) >= time.Minute { + if time.Since(now) >= timeout { t.Fatal("pullN took too long") } } else {