Skip to content

Commit

Permalink
Lower retry interval in AwaitResultOrError
Browse files Browse the repository at this point in the history
...from 5 sec to 500 ms. If an operation criteria isn't initially met,
most of the time it will take far less than 5 sec.

Signed-off-by: Tom Pantelis <[email protected]>
  • Loading branch information
tpantelis committed Oct 23, 2023
1 parent c9bb11b commit 494344a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,8 @@ func AwaitUntil(opMsg string, doOperation DoOperationFunc, checkResult CheckResu
func AwaitResultOrError(opMsg string, doOperation DoOperationFunc, checkResult CheckResultFunc) (interface{}, string, error) {
var finalResult interface{}
var lastMsg string
err := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, time.Duration(TestContext.OperationTimeout)*time.Second, true,
err := wait.PollUntilContextTimeout(context.Background(), 500*time.Millisecond,
time.Duration(TestContext.OperationTimeout)*time.Second, true,
func(_ context.Context) (bool, error) {
result, err := doOperation()
if err != nil {
Expand Down

0 comments on commit 494344a

Please sign in to comment.