Skip to content

Commit a05b6ed

Browse files
authored
test(pubsub): use default MinExtensionPeriod for exactly once tests (#8502)
* test(pubsub): update retry deadlines for exactly once tests * use default MinExtensionPeriod, which is higher when eod is enabled * add debug log
1 parent 9d1c775 commit a05b6ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pubsub/subscription_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"context"
1919
"errors"
2020
"fmt"
21+
"log"
2122
"testing"
2223
"time"
2324

@@ -689,12 +690,11 @@ func TestExactlyOnceDelivery_AckRetryDeadlineExceeded(t *testing.T) {
689690

690691
s.ReceiveSettings = ReceiveSettings{
691692
NumGoroutines: 1,
692-
// This needs to be greater than total deadline otherwise the message will be redelivered.
693-
MinExtensionPeriod: 30 * time.Second,
694693
}
695694
// Override the default timeout here so this test doesn't take 10 minutes.
696695
exactlyOnceDeliveryRetryDeadline = 10 * time.Second
697696
err = s.Receive(ctx, func(ctx context.Context, msg *Message) {
697+
log.Printf("received message: %v\n", msg)
698698
ar := msg.AckWithResult()
699699
s, err := ar.Get(ctx)
700700
if s != AcknowledgeStatusOther {

0 commit comments

Comments
 (0)