From ff7f4b4224f0a12114bfb26c28efe73cf03fb195 Mon Sep 17 00:00:00 2001 From: Maisem Ali Date: Thu, 24 Aug 2023 16:48:22 -0400 Subject: [PATCH] cmd/testwrapper: fix off-by-one error in maxAttempts check It was checking if `>= maxAttempts` which meant that the third attempt would never run. Updates #8493 Signed-off-by: Maisem Ali --- cmd/testwrapper/testwrapper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/testwrapper/testwrapper.go b/cmd/testwrapper/testwrapper.go index 31909d666..d392a070c 100644 --- a/cmd/testwrapper/testwrapper.go +++ b/cmd/testwrapper/testwrapper.go @@ -232,7 +232,7 @@ type nextRun struct { var thisRun *nextRun thisRun, toRun = toRun[0], toRun[1:] - if thisRun.attempt >= maxAttempts { + if thisRun.attempt > maxAttempts { fmt.Println("max attempts reached") os.Exit(1) }