Override the DNS minimum resolution interval used by the resolver.
(t *testing.T, d time.Duration)
| 71 | |
| 72 | // Override the DNS minimum resolution interval used by the resolver. |
| 73 | func 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. |
| 80 | func overrideTimeAfterFunc(t *testing.T, d time.Duration) { |
no outgoing calls
no test coverage detected