Commit 67500b39 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #42443 from Random-Liu/fix-node-e2e-npd

Automatic merge from submit-queue (batch tested with PRs 42443, 38924, 42367, 42391, 42310) Cast system uptime to time.Duration to fix cross build. Fixes https://github.com/kubernetes/kubernetes/issues/42441. Cast system uptime to `time.Duration` to avoid different behavior on different architectures. @sjenning @ixdy @ncdc
parents f7c07a12 d41c2503
......@@ -392,7 +392,7 @@ func getNodeTime() (time.Time, time.Time, error) {
// Get node boot time. NOTE that because we get node current time before uptime, the boot time
// calculated will be a little earlier than the real boot time. This won't affect the correctness
// of the test result.
bootTime := nodeTime.Add(-time.Duration(info.Uptime * int64(time.Second)))
bootTime := nodeTime.Add(-time.Duration(info.Uptime) * time.Second)
return nodeTime, bootTime, nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment