Skip to content

Commit cff3ece

Browse files
committed
fix ci test flake
1 parent 1ab1679 commit cff3ece

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/controllers/machine/garbagecollect/suite_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ var _ = Describe("GarbageCollection", func() {
105105
machine = ExpectExists(ctx, env.Client, machine)
106106

107107
// 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))
109109

110110
// Delete the machine from the cloudprovider
111111
Expect(cloudProvider.Delete(ctx, machine)).To(Succeed())
@@ -132,7 +132,7 @@ var _ = Describe("GarbageCollection", func() {
132132
}
133133

134134
// 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))
136136

137137
for _, machine := range machines {
138138
// Delete the machine from the cloudprovider
@@ -160,7 +160,7 @@ var _ = Describe("GarbageCollection", func() {
160160
machine = ExpectExists(ctx, env.Client, machine)
161161

162162
// 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))
164164

165165
// Reconcile the Machine. It should not be deleted by this flow since it has never been registered
166166
ExpectReconcileSucceeded(ctx, garbageCollectionController, client.ObjectKey{})

0 commit comments

Comments
 (0)