Test: rework concurrentExchange (#576)

See issue #575. Try to fix (and maybe trigger it)
This commit is contained in:
Miek Gieben 2017-11-17 15:31:51 +00:00 committed by GitHub
parent 99c447f9f6
commit 7994cb36ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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 {