internal/daemon: simplify time update tests (#5041)
Using time.After makes the intent clearer
This commit is contained in:
1 parent
123286cf94
commit
96688b36d5
3 files changed
+3
-3
No files matched your search
@@ -937,7 +937,7 @@ func (tc *TestController) WaitForNextWorkerStatusUpdate(workerStatusName string)
|
||||
break
|
||||
}
|
||||
|
||||
if waitStatusCurrent.Sub(waitStatusStart) > 0 {
|
||||
if waitStatusCurrent.After(waitStatusStart) {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ func (w *Worker) WaitForNextSuccessfulStatusUpdate() error {
|
||||
return ctx.Err()
|
||||
}
|
||||
|
||||
if w.lastSuccessfulStatusTime().Sub(waitStatusStart) > 0 {
|
||||
if w.lastSuccessfulStatusTime().After(waitStatusStart) {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -711,7 +711,7 @@ func (w *Worker) Shutdown() error {
|
||||
break
|
||||
}
|
||||
|
||||
if w.lastSuccessfulStatusTime().Sub(waitStatusStart) > 0 {
|
||||
if w.lastSuccessfulStatusTime().After(waitStatusStart) {
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user