From b8ea31bc23af096282d75e4de973a01b04c66169 Mon Sep 17 00:00:00 2001 From: Enrico Regge Date: Wed, 10 Jun 2026 00:15:11 +0200 Subject: [PATCH 1/2] apply random sleep per default --- helloworld/helloworld.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helloworld/helloworld.go b/helloworld/helloworld.go index 05e023fb6..ff8317473 100644 --- a/helloworld/helloworld.go +++ b/helloworld/helloworld.go @@ -310,9 +310,9 @@ func main() { fleetName := os.Getenv("CE_FLEET_NAME") sleep := os.Getenv("SLEEP") - sleepDuration := 0 - if sleep == "RANDOM" { - sleepDuration = rand.IntN(SLEEP_MAX-SLEEP_MIN) + SLEEP_MIN + sleepDuration := rand.IntN(SLEEP_MAX-SLEEP_MIN) + SLEEP_MIN + if sleep == "NONE" { + sleepDuration = 0 } else { sleepDuration, _ = strconv.Atoi(sleep) } From 1c413173a40853f1944f608ec3f90e572a0cce72 Mon Sep 17 00:00:00 2001 From: Enrico Regge Date: Wed, 10 Jun 2026 00:19:31 +0200 Subject: [PATCH 2/2] make sure the default is to apply a sleep --- helloworld/helloworld.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helloworld/helloworld.go b/helloworld/helloworld.go index ff8317473..1af58d209 100644 --- a/helloworld/helloworld.go +++ b/helloworld/helloworld.go @@ -313,7 +313,7 @@ func main() { sleepDuration := rand.IntN(SLEEP_MAX-SLEEP_MIN) + SLEEP_MIN if sleep == "NONE" { sleepDuration = 0 - } else { + } else if len(sleep) > 0 { sleepDuration, _ = strconv.Atoi(sleep) }