MCPcopy
hub / github.com/grpc/grpc-go / overrideResolutionInterval

Function overrideResolutionInterval

internal/resolver/dns/dns_resolver_test.go:73–77  ·  view source on GitHub ↗

Override the DNS minimum resolution interval used by the resolver.

(t *testing.T, d time.Duration)

Source from the content-addressed store, hash-verified

71
72// Override the DNS minimum resolution interval used by the resolver.
73func overrideResolutionInterval(t *testing.T, d time.Duration) {
74 origMinResInterval := dns.MinResolutionInterval
75 dnspublic.SetMinResolutionInterval(d)
76 t.Cleanup(func() { dnspublic.SetMinResolutionInterval(origMinResInterval) })
77}
78
79// Override the timer used by the DNS resolver to fire after a duration of d.
80func overrideTimeAfterFunc(t *testing.T, d time.Duration) {

Callers 3

TestIPResolverMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected