WaitUntil sets the channel that will block the mock's return until its closed or a message is received. Mock.On("MyMethod", arg1, arg2).WaitUntil(time.After(time.Second))
(w <-chan time.Time)
| 156 | // |
| 157 | // Mock.On("MyMethod", arg1, arg2).WaitUntil(time.After(time.Second)) |
| 158 | func (c *Call) WaitUntil(w <-chan time.Time) *Call { |
| 159 | c.lock() |
| 160 | defer c.unlock() |
| 161 | c.WaitFor = w |
| 162 | return c |
| 163 | } |
| 164 | |
| 165 | // After sets how long to block until the call returns |
| 166 | // |