mirror of
https://github.com/golang/go
synced 2024-11-20 09:44:45 -07:00
testing: improve diagnosis of a potential misuse of RunParallel
LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/68230045
This commit is contained in:
parent
ea87501750
commit
5b6aaba1ce
@ -417,8 +417,8 @@ func (b *B) RunParallel(body func(*PB)) {
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
if n == 0 {
|
if n <= uint64(b.N) && !b.Failed() {
|
||||||
b.Fatal("RunParallel body did not not call PB.Next")
|
b.Fatal("RunParallel: body exited without pb.Next() == false")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user