Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions autoconf/fetch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,10 +633,7 @@ func TestCalculateEffectiveRefreshInterval(t *testing.T) {
// Verify the result is always the minimum of the two values (when server TTL > 0)
if tt.cacheTTL > 0 {
serverTTL := time.Duration(tt.cacheTTL) * time.Second
expectedMin := tt.userInterval
if serverTTL < tt.userInterval {
expectedMin = serverTTL
}
expectedMin := min(serverTTL, tt.userInterval)
assert.Equal(t, expectedMin, result, "result should be minimum of user interval and server TTL")
} else {
// When server TTL <= 0, should always return user interval
Expand Down
Loading