From 17a76a67f69be64043c80e0745da7dfab6903caf Mon Sep 17 00:00:00 2001 From: Matthias Riegler Date: Tue, 4 Jul 2023 09:28:45 +0200 Subject: [PATCH] fix(pubsub/pstest): update maxMessageRetentionDuration to be 31 days https://cloud.google.com/pubsub/docs/replay-overview#configuring_message_retention Signed-off-by: Matthias Riegler --- pubsub/pstest/fake.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubsub/pstest/fake.go b/pubsub/pstest/fake.go index f999af01c176..c8b6587dfbe6 100644 --- a/pubsub/pstest/fake.go +++ b/pubsub/pstest/fake.go @@ -557,10 +557,10 @@ func checkAckDeadline(ads int32) error { const ( minMessageRetentionDuration = 10 * time.Minute - maxMessageRetentionDuration = 168 * time.Hour + maxMessageRetentionDuration = 31 * 24 * time.Hour // 31 days is the maximum supported duration (https://cloud.google.com/pubsub/docs/replay-overview#configuring_message_retention) ) -var defaultMessageRetentionDuration = durpb.New(maxMessageRetentionDuration) +var defaultMessageRetentionDuration = durpb.New(168 * time.Hour) // default is 7 days func checkMRD(pmrd *durpb.Duration) error { if pmrd == nil {