func (e *FailLaterExecutor) Execute(opts exec.ExecuteOptions) error { defer e.calls.Increment() var err error fail := e.Succeeds <= e.calls.Val() if fail { opts.Stdout = opts.Stderr err = errors.New("") } e.FakeExecutor.Execute(opts) return err }
func (e *RetryExecutor) Execute(opts exec.ExecuteOptions) error { defer e.calls.Increment() var err error succeed := e.Failures <= e.calls.Val() if !succeed { opts.Stdout = opts.Stderr err = errors.New("") } e.FakeExecutor.Execute(opts) return err }