From 235f854087dae0882bacd63ecedbea02089423d4 Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Wed, 25 Sep 2019 16:20:55 -0700 Subject: [PATCH] Changing calls on functions that use JobUpdateKey to reflect change made for memory safety. --- examples/client.go | 4 ++-- realis_e2e_test.go | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/client.go b/examples/client.go index 4740ae6..7d9691f 100644 --- a/examples/client.go +++ b/examples/client.go @@ -377,7 +377,7 @@ func main() { case "resumeJobUpdate": key := job.JobKey() - err := r.ResumeJobUpdate(&aurora.JobUpdateKey{ + err := r.ResumeJobUpdate(aurora.JobUpdateKey{ Job: &key, ID: updateId, }, "") @@ -388,7 +388,7 @@ func main() { case "pulseJobUpdate": key := job.JobKey() - resp, err := r.PulseJobUpdate(&aurora.JobUpdateKey{ + resp, err := r.PulseJobUpdate(aurora.JobUpdateKey{ Job: &key, ID: updateId, }) diff --git a/realis_e2e_test.go b/realis_e2e_test.go index cef96fa..d5d48f9 100644 --- a/realis_e2e_test.go +++ b/realis_e2e_test.go @@ -365,7 +365,11 @@ pulseLoop: for { select { case <-ticker.C: - pulseStatus, err := r.PulseJobUpdate(result.GetKey()) + if result.GetKey() == nil { + continue + } + + pulseStatus, err := r.PulseJobUpdate(*result.GetKey()) assert.Nil(t, err) if pulseStatus != aurora.JobUpdatePulseStatus_OK && pulseStatus != aurora.JobUpdatePulseStatus_FINISHED {