File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -81,10 +81,11 @@ func SelfUpdateEnabled() bool {
8181}
8282
8383// UpdateCheckInterval returns the interval between update checks.
84- // Controlled by HOSTLINK_UPDATE_CHECK_INTERVAL (default: 1h , clamped to [1m, 24h]).
84+ // Controlled by HOSTLINK_UPDATE_CHECK_INTERVAL (default: 5m , clamped to [1m, 24h]).
8585func UpdateCheckInterval () time.Duration {
8686 const (
87- defaultInterval = 1 * time .Hour
87+ // TODO(SLFHOST-11): revert to 1*time.Hour once self-update debugging is complete
88+ defaultInterval = 5 * time .Minute
8889 minInterval = 1 * time .Minute
8990 maxInterval = 24 * time .Hour
9091 )
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ func TestSelfUpdateEnabled_InvalidFallsToDefault(t *testing.T) {
2727 assert .True (t , SelfUpdateEnabled ())
2828}
2929
30- func TestUpdateCheckInterval_Default1h (t * testing.T ) {
30+ func TestUpdateCheckInterval_Default5m (t * testing.T ) {
3131 t .Setenv ("HOSTLINK_UPDATE_CHECK_INTERVAL" , "" )
32- assert .Equal (t , 1 * time .Hour , UpdateCheckInterval ())
32+ assert .Equal (t , 5 * time .Minute , UpdateCheckInterval ())
3333}
3434
3535func TestUpdateCheckInterval_CustomValue (t * testing.T ) {
@@ -49,7 +49,7 @@ func TestUpdateCheckInterval_ClampedToMax(t *testing.T) {
4949
5050func TestUpdateCheckInterval_InvalidFallsToDefault (t * testing.T ) {
5151 t .Setenv ("HOSTLINK_UPDATE_CHECK_INTERVAL" , "garbage" )
52- assert .Equal (t , 1 * time .Hour , UpdateCheckInterval ())
52+ assert .Equal (t , 5 * time .Minute , UpdateCheckInterval ())
5353}
5454
5555func TestUpdateLockTimeout_Default5m (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments