Skip to content

Commit f173f0c

Browse files
committed
kube-apiserver/leaderelection/tests: fix test case PingTime should be ahead of RenewTime
1 parent b8045f9 commit f173f0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controlplane/controller/leaderelection/leaderelection_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func TestReconcileElectionStep(t *testing.T) {
174174
LeaseName: "component-A",
175175
EmulationVersion: "1.20.0",
176176
BinaryVersion: "1.20.0",
177-
PingTime: ptr.To(metav1.NewMicroTime(fakeClock.Now())),
177+
PingTime: ptr.To(metav1.NewMicroTime(fakeClock.Now().Add(-1 * time.Millisecond))),
178178
RenewTime: ptr.To(metav1.NewMicroTime(fakeClock.Now())),
179179
PreferredStrategies: []v1.CoordinatedLeaseStrategy{v1.OldestEmulationVersion},
180180
},

0 commit comments

Comments
 (0)