dnsforward: fix test
This commit is contained in:
parent
355cec1d7b
commit
ce743a35ef
|
@ -584,7 +584,13 @@ func TestSafeSearch(t *testing.T) {
|
|||
req := createTestMessage(tc.host)
|
||||
|
||||
var reply *dns.Msg
|
||||
|
||||
// Use a mutex, since require.Eventually uses goroutines.
|
||||
mu := &sync.Mutex{}
|
||||
require.Eventually(t, func() (ok bool) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
|
||||
reply, _, err = client.Exchange(req, addr)
|
||||
|
||||
return err == nil
|
||||
|
|
Loading…
Reference in New Issue