Commit ec521467 authored by Leon Klingele's avatar Leon Klingele Committed by Mikio Hara

net: add missing error check in test

Change-Id: Id2e57bc8e18e062f60c6ac8a58dc15e049352088
GitHub-Last-Rev: 6d33b809cf8a3b5412333b1c3cc237000be8101d
GitHub-Pull-Request: golang/go#30016
Reviewed-on: https://go-review.googlesource.com/c/160440
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarMikio Hara <mikioh.public.networking@gmail.com>
parent b9d19eff
......@@ -338,6 +338,11 @@ func TestDialParallel(t *testing.T) {
if c != nil {
c.Close()
}
if tt.expectOk && err != nil {
t.Errorf("#%d (cancel): got %v; want nil", i, err)
} else if !tt.expectOk && err == nil {
t.Errorf("#%d (cancel): got nil; want non-nil", i)
}
elapsed = time.Now().Sub(startTime)
if elapsed > 100*time.Millisecond {
t.Errorf("#%d (cancel): got %v; want <= 100ms", i, elapsed)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment