Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Attempt ¶
func Attempt(t test.TestHelper, f func(t test.TestHelper)) *test.RetryTestHelper
Attempt runs the given function, captures any errors thrown by the function, and returns a RetryTestHelper, which you can use to: - check if the attempt failed by invoking retryTestHelper.Failed() - print everything that the function logged by invoking retryTestHelper.FlushLogBuffer()
func UntilSuccess ¶
func UntilSuccess(t test.TestHelper, f func(t test.TestHelper))
func UntilSuccessWithOptions ¶
func UntilSuccessWithOptions(t test.TestHelper, options RetryOptions, f func(t test.TestHelper))
Types ¶
type RetryOptions ¶
type RetryOptions struct {
// contains filtered or unexported fields
}
func Options ¶
func Options() RetryOptions
func (RetryOptions) DelayBetweenAttempts ¶
func (o RetryOptions) DelayBetweenAttempts(delay time.Duration) RetryOptions
func (RetryOptions) LogAttempts ¶
func (o RetryOptions) LogAttempts(logAttempts bool) RetryOptions
func (RetryOptions) MaxAttempts ¶
func (o RetryOptions) MaxAttempts(maxAttempts int) RetryOptions
Click to show internal directories.
Click to hide internal directories.