(t *testing.T, fn func() bool, retryCount, msSleepTime int, failureMsgAndArgs ...interface{})
| 4353 | } |
| 4354 | |
| 4355 | func waitAndAssertConditionWithOptions(t *testing.T, fn func() bool, retryCount, msSleepTime int, failureMsgAndArgs ...interface{}) { |
| 4356 | for i := 0; i <= retryCount; i++ { |
| 4357 | if i == retryCount { |
| 4358 | assert.Fail(t, "Condition failed to be satisfied", failureMsgAndArgs...) |
| 4359 | } |
| 4360 | if fn() { |
| 4361 | break |
| 4362 | } |
| 4363 | time.Sleep(time.Millisecond * time.Duration(msSleepTime)) |
| 4364 | } |
| 4365 | } |
| 4366 | |
| 4367 | func waitAndAssertCondition(t *testing.T, fn func() bool, failureMsgAndArgs ...interface{}) { |
| 4368 | waitAndAssertConditionWithOptions(t, fn, 20, 100, failureMsgAndArgs...) |
no outgoing calls
no test coverage detected