internal/daemon: simplify time update tests (#5041)

Using time.After makes the intent clearer
This commit is contained in:
Johan Brandhorst-Satzkorn authored and GitHub committed 2024-08-27 11:00:04 -07:00
1 parent 123286cf94
commit 96688b36d5
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -937,7 +937,7 @@ func (tc *TestController) WaitForNextWorkerStatusUpdate(workerStatusName string)
break
}
if waitStatusCurrent.Sub(waitStatusStart) > 0 {
if waitStatusCurrent.After(waitStatusStart) {
break
}
}
+1 -1
View File
@@ -106,7 +106,7 @@ func (w *Worker) WaitForNextSuccessfulStatusUpdate() error {
return ctx.Err()
}
if w.lastSuccessfulStatusTime().Sub(waitStatusStart) > 0 {
if w.lastSuccessfulStatusTime().After(waitStatusStart) {
break
}
}
+1 -1
View File
@@ -711,7 +711,7 @@ func (w *Worker) Shutdown() error {
break
}
if w.lastSuccessfulStatusTime().Sub(waitStatusStart) > 0 {
if w.lastSuccessfulStatusTime().After(waitStatusStart) {
break
}