// heartbeat time changed, but there were relevant changes in the status, keep waiting
framework.Logf("node status heartbeat changed in %s (with other status changes), waiting for %s",currentHeartbeatTime.Sub(lastHeartbeatTime),leaseDuration)
framework.Logf("node status heartbeat changed in %s, waiting for %s",currentHeartbeatTime.Sub(lastHeartbeatTime),leaseDuration)
lastStatus=currentStatus
returnfmt.Errorf("node status heartbeat changed in %s, waiting for %s",currentHeartbeatTime.Sub(lastHeartbeatTime),leaseDuration)
returnfalse,nil
}
}
returnnil
},5*time.Minute,time.Second).Should(BeNil())
// heartbeat time changed, with no other status changes, in less time than we expected, so fail.
returnfalse,fmt.Errorf("node status heartbeat changed in %s (with no other status changes), was waiting for %s",currentHeartbeatTime.Sub(lastHeartbeatTime),leaseDuration)
})
// a timeout is acceptable, since it means we waited 5 minutes and didn't see any unwarranted node status updates
iferr!=nil&&err!=wait.ErrWaitTimeout{
Expect(err).NotTo(HaveOccurred(),"error waiting for infrequent nodestatus update")
}
By("verify node is still in ready status even though node status report is infrequent")
By("verify node is still in ready status even though node status report is infrequent")
// This check on node status is only meaningful when this e2e test is
// This check on node status is only meaningful when this e2e test is
...
@@ -145,12 +158,14 @@ var _ = framework.KubeDescribe("NodeLease", func() {
...
@@ -145,12 +158,14 @@ var _ = framework.KubeDescribe("NodeLease", func() {