Skip to content

Commit

Permalink
more logs for retries
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke committed Oct 18, 2023
1 parent e22b905 commit 646d54c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/core-web-browserstack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,22 @@ func run(processCtx context.Context, runnerCtx context.Context, errChan chan err
if err != nil {
{
time.Sleep(time.Second * 2)
log.Printf("Retrying '%s' (1)", b.ResultKey())
err1 := runTest(ctx, client, b, sessionName)
time.Sleep(time.Second * 2)
log.Printf("Retrying '%s' (2)", b.ResultKey())
err2 := runTest(ctx, client, b, sessionName)

errCount := 1
if err1 != nil {
errCount++
}
if err2 != nil {
errCount++
}

log.Printf("After retries '%s' failed %d out of 3 times", b.ResultKey(), errCount)

// 2 out of 3 is good enough
if err1 == nil && err2 == nil {
return
Expand Down

0 comments on commit 646d54c

Please sign in to comment.