Repeat causes the fault to repeat N times.
(n int)
| 53 | |
| 54 | // Repeat causes the fault to repeat N times. |
| 55 | func (f *Fault) Repeat(n int) *Fault { |
| 56 | f.mu.Lock() |
| 57 | f.repeatCount = n |
| 58 | f.mu.Unlock() |
| 59 | |
| 60 | return f |
| 61 | } |
| 62 | |
| 63 | // SleepFor sleeps for the specified amount of time. |
| 64 | func (f *Fault) SleepFor(d time.Duration) *Fault { |