From 20dafba36c984bfe0b893b0caa9fecfee3baea05 Mon Sep 17 00:00:00 2001 From: Fernando Rocha Date: Thu, 25 Jul 2024 00:27:53 -0700 Subject: [PATCH] removing sleeps and increasing timeout Signed-off-by: Fernando Rocha --- jobs/go/sdk/README.md | 2 +- jobs/go/sdk/job-scheduler/job-scheduler.go | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/jobs/go/sdk/README.md b/jobs/go/sdk/README.md index d0d76f71f..5a969fff0 100644 --- a/jobs/go/sdk/README.md +++ b/jobs/go/sdk/README.md @@ -38,7 +38,7 @@ output_match_mode: substring match_order: none background: true sleep: 120 -timeout_seconds: 180 +timeout_seconds: 240 --> ```bash diff --git a/jobs/go/sdk/job-scheduler/job-scheduler.go b/jobs/go/sdk/job-scheduler/job-scheduler.go index 8a3645450..fb4d657f2 100644 --- a/jobs/go/sdk/job-scheduler/job-scheduler.go +++ b/jobs/go/sdk/job-scheduler/job-scheduler.go @@ -62,16 +62,12 @@ func main() { log.Fatalln("Error scheduling job: ", err) } - time.Sleep(3 * time.Second) - // Schedule C-3PO job err = schedule(droidJobs[1]) if err != nil { log.Fatalln("Error scheduling job: ", err) } - time.Sleep(5 * time.Second) - // Get C-3PO job resp, err := get(droidJobs[1]) if err != nil { @@ -85,8 +81,6 @@ func main() { log.Fatalln("Error scheduling job: ", err) } - time.Sleep(5 * time.Second) - // Get BB-8 job resp, err = get(droidJobs[2]) if err != nil { @@ -94,14 +88,14 @@ func main() { } fmt.Println("Get job response: ", resp) - time.Sleep(5 * time.Second) - // Delete BB-8 job err = delete(droidJobs[2]) if err != nil { log.Fatalln("Error deleting job: ", err) } fmt.Println("Job deleted: ", droidJobs[2].Name) + + //time.Sleep(15 * time.Second) } // Schedules a job by invoking grpc service from job-service passing a DroidJob as an argument