aboutsummaryrefslogtreecommitdiff
path: root/internal/model/feed_test.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <f@miniflux.net> 2023-10-16 21:20:58 -0700
committerGravatar Frédéric Guillot <f@miniflux.net> 2023-10-16 21:41:18 -0700
commitcc44d14722612d6a3db4360a971ac7cd0844b7ed (patch)
treebc8957460c5bbf91264ccd14fba499a5726ce32d /internal/model/feed_test.go
parent54eb500315c5f506004c4659a6c964f61d40f6d5 (diff)
downloadv2-cc44d14722612d6a3db4360a971ac7cd0844b7ed.tar.gz
v2-cc44d14722612d6a3db4360a971ac7cd0844b7ed.tar.zst
v2-cc44d14722612d6a3db4360a971ac7cd0844b7ed.zip
Avoid excessive manual polling with default scheduler
Diffstat (limited to 'internal/model/feed_test.go')
-rw-r--r--internal/model/feed_test.go4
1 files changed, 4 insertions, 0 deletions
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) {