From cc44d14722612d6a3db4360a971ac7cd0844b7ed Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Mon, 16 Oct 2023 21:20:58 -0700 Subject: Avoid excessive manual polling with default scheduler --- internal/model/feed_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/model/feed_test.go') diff --git a/internal/model/feed_test.go b/internal/model/feed_test.go index 34f89e90..0a4c44a8 100644 --- a/internal/model/feed_test.go +++ b/internal/model/feed_test.go @@ -97,6 +97,10 @@ func TestFeedScheduleNextCheckDefault(t *testing.T) { if feed.NextCheckAt.IsZero() { t.Error(`The next_check_at must be set`) } + + if feed.NextCheckAt.After(time.Now().Add(time.Minute * time.Duration(config.Opts.PollingFrequency()))) { + t.Error(`The next_check_at should not be after the now + polling frequency`) + } } func TestFeedScheduleNextCheckEntryCountBasedMaxInterval(t *testing.T) { -- cgit v1.2.3