diff --git a/internal/daemon/controller/testing.go b/internal/daemon/controller/testing.go index 92cd8552ef..4124763a65 100644 --- a/internal/daemon/controller/testing.go +++ b/internal/daemon/controller/testing.go @@ -941,7 +941,7 @@ func (tc *TestController) WaitForNextWorkerStatusUpdate(workerStatusName string) break } - if waitStatusCurrent.Sub(waitStatusStart) > 0 { + if waitStatusCurrent.After(waitStatusStart) { break } } diff --git a/internal/daemon/worker/status.go b/internal/daemon/worker/status.go index 31d26f1372..3d391201bf 100644 --- a/internal/daemon/worker/status.go +++ b/internal/daemon/worker/status.go @@ -110,7 +110,7 @@ func (w *Worker) WaitForNextSuccessfulStatusUpdate() error { return ctx.Err() } - if w.lastSuccessfulStatusTime().Sub(waitStatusStart) > 0 { + if w.lastSuccessfulStatusTime().After(waitStatusStart) { break } } diff --git a/internal/daemon/worker/worker.go b/internal/daemon/worker/worker.go index 932fc39b6c..6562bf141c 100644 --- a/internal/daemon/worker/worker.go +++ b/internal/daemon/worker/worker.go @@ -715,7 +715,7 @@ func (w *Worker) Shutdown() error { break } - if w.lastSuccessfulStatusTime().Sub(waitStatusStart) > 0 { + if w.lastSuccessfulStatusTime().After(waitStatusStart) { break }