fix: use common logging implementation for DNSCache (#11284)

This commit is contained in:
Harshavardhana
2021-01-15 14:04:56 -08:00
committed by GitHub
parent 4e06a72632
commit c222bde14b
4 changed files with 11 additions and 6 deletions

View File

@@ -31,9 +31,13 @@ var (
testDefaultLookupTimeout = 1 * time.Second
)
func logOnce(ctx context.Context, err error, id interface{}, errKind ...interface{}) {
// no-op
}
func testDNSCache(t *testing.T) *DNSCache {
t.Helper() // skip printing file and line information from this function
return NewDNSCache(testFreq, testDefaultLookupTimeout)
return NewDNSCache(testFreq, testDefaultLookupTimeout, logOnce)
}
func TestDialContextWithDNSCache(t *testing.T) {