@@ -105,7 +105,7 @@ var _ = Describe("GarbageCollection", func() {
105
105
machine = ExpectExists (ctx , env .Client , machine )
106
106
107
107
// Step forward to move past the cache eventual consistency timeout
108
- fakeClock .Step (time .Second * 20 )
108
+ fakeClock .SetTime (time .Now (). Add ( time . Second * 20 ) )
109
109
110
110
// Delete the machine from the cloudprovider
111
111
Expect (cloudProvider .Delete (ctx , machine )).To (Succeed ())
@@ -132,7 +132,7 @@ var _ = Describe("GarbageCollection", func() {
132
132
}
133
133
134
134
// Step forward to move past the cache eventual consistency timeout
135
- fakeClock .Step (time .Second * 20 )
135
+ fakeClock .SetTime (time .Now (). Add ( time . Second * 20 ) )
136
136
137
137
for _ , machine := range machines {
138
138
// Delete the machine from the cloudprovider
@@ -160,7 +160,7 @@ var _ = Describe("GarbageCollection", func() {
160
160
machine = ExpectExists (ctx , env .Client , machine )
161
161
162
162
// Step forward to move past the cache eventual consistency timeout
163
- fakeClock .Step (time .Second * 20 )
163
+ fakeClock .SetTime (time .Now (). Add ( time . Second * 20 ) )
164
164
165
165
// Reconcile the Machine. It should not be deleted by this flow since it has never been registered
166
166
ExpectReconcileSucceeded (ctx , garbageCollectionController , client.ObjectKey {})
0 commit comments