Skip to content

Commit 93ccb57

Browse files
authored
test(pubsub): increase TestIntegration_All timeout for Pull flakiness (#5450)
1 parent f0210f0 commit 93ccb57

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pubsub/integration_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,14 +310,15 @@ func testPublishAndReceive(t *testing.T, client *Client, maxMsgs int, synchronou
310310
// Use a timeout to ensure that Pull does not block indefinitely if there are
311311
// unexpectedly few messages available.
312312
now := time.Now()
313-
timeoutCtx, cancel := context.WithTimeout(ctx, time.Minute)
313+
timeout := 3 * time.Minute
314+
timeoutCtx, cancel := context.WithTimeout(ctx, timeout)
314315
defer cancel()
315316
gotMsgs, err := pullN(timeoutCtx, sub, len(want), func(ctx context.Context, m *Message) {
316317
m.Ack()
317318
})
318319
if err != nil {
319320
if c := status.Convert(err); c.Code() == codes.Canceled {
320-
if time.Since(now) >= time.Minute {
321+
if time.Since(now) >= timeout {
321322
t.Fatal("pullN took too long")
322323
}
323324
} else {

0 commit comments

Comments
 (0)