in testlib/mock.go [35:44]
func (wfc *waitForCalls) DoAndWait(t *testing.T, calls int32, f func()) {
f()
for atomic.LoadInt32(&wfc.calls) < calls {
select {
case <-wfc.waitChan:
case <-time.After(5 * time.Second):
t.Fatal("DoAndWait: nothing happened after 5 seconds")
}
}
}