diff --git a/metrics/metrics.go b/metrics/metrics.go index 8d00c2db4..56e7477fb 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -121,7 +121,8 @@ func (r *RPCMonitor) cleanup() (removed int64) { for k, v := range r.deliveryTimings { if time.Now().Add(-time.Second * 10).After(v) { // If the delivery has been in the map for more than 10 seconds - // it has timed out, delete it so the map doesn't get cluttered + // it has timed out, delete it so the map doesn't grow + // indefinitely. delete(r.deliveryTimings, k) removed++ } diff --git a/va/validation-authority_test.go b/va/validation-authority_test.go index a4c99a5e5..e0eb90626 100644 --- a/va/validation-authority_test.go +++ b/va/validation-authority_test.go @@ -260,6 +260,7 @@ func brokenTLSSrv(t *testing.T, stopChan, waitChan chan bool) { func TestSimpleHttpTLS(t *testing.T) { va := NewValidationAuthorityImpl(true) + va.Stats, _ = statsd.NewNoopClient() va.DNSResolver = &mocks.MockDNS{} chall := core.Challenge{Type: core.ChallengeTypeSimpleHTTP, Token: expectedToken, ValidationRecord: []core.ValidationRecord{}} @@ -364,6 +365,7 @@ func TestSimpleHttp(t *testing.T) { func TestSimpleHttpRedirectLookup(t *testing.T) { va := NewValidationAuthorityImpl(true) + va.Stats, _ = statsd.NewNoopClient() va.DNSResolver = &mocks.MockDNS{} tls := false @@ -422,6 +424,7 @@ func TestSimpleHttpRedirectLookup(t *testing.T) { func TestSimpleHttpRedirectLoop(t *testing.T) { va := NewValidationAuthorityImpl(true) + va.Stats, _ = statsd.NewNoopClient() va.DNSResolver = &mocks.MockDNS{} tls := false