summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/miekg/dns/client_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/miekg/dns/client_test.go')
-rw-r--r--vendor/github.com/miekg/dns/client_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/miekg/dns/client_test.go b/vendor/github.com/miekg/dns/client_test.go
index ef977aefc..cc4198319 100644
--- a/vendor/github.com/miekg/dns/client_test.go
+++ b/vendor/github.com/miekg/dns/client_test.go
@@ -458,12 +458,12 @@ func TestTruncatedMsg(t *testing.T) {
t.Errorf("error should not be ErrTruncated from question cutoff unpack: %v", err)
}
- // Finally, if we only have the header, we should still return an error
+ // Finally, if we only have the header, we don't return an error.
buf1 = buf[:12]
r = new(Msg)
- if err = r.Unpack(buf1); err == nil || err != ErrTruncated {
- t.Errorf("error not ErrTruncated from header-only unpack: %v", err)
+ if err = r.Unpack(buf1); err != nil {
+ t.Errorf("from header-only unpack should not return an error: %v", err)
}
}
@@ -568,11 +568,11 @@ func TestConcurrentExchanges(t *testing.T) {
wg.Add(len(r))
for i := 0; i < len(r); i++ {
go func(i int) {
+ defer wg.Done()
r[i], _, _ = c.Exchange(m.Copy(), addrstr)
if r[i] == nil {
- t.Fatalf("response %d is nil", i)
+ t.Errorf("response %d is nil", i)
}
- wg.Done()
}(i)
}
select {