Skip to content

Commit

Permalink
NR-170460: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercoll committed Oct 18, 2023
1 parent 8512a94 commit a787420
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/metrics/host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
)

func TestHostSample_CachedNtpOffset(t *testing.T) {
timeout := uint(5000)
interval := uint(15)
timeout := 5000 * time.Millisecond
interval := 15 * time.Minute
ntpMonitor := NewNtp([]string{"one"}, timeout, interval)
ntpMonitor.ntpQuery = ntpQueryMock([]ntpResp{
{
Expand Down
2 changes: 2 additions & 0 deletions pkg/metrics/ntp.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ func guardInterval(interval time.Duration) time.Duration {

// Offset returns the Ntp servers offset.
func (p *Ntp) Offset() (time.Duration, error) {
syslog.WithField("timeout", p.timeout).Warn("CHECK NTP TIMEOUT")
syslog.WithField("interval", p.interval).Warn("CHECK NTP INTERVAL")
if len(p.pool) == 0 {
return 0, ErrEmptyNtpHosts
}
Expand Down

0 comments on commit a787420

Please sign in to comment.